/add
Description
Sample Upload Request using add
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_API_TOKEN>");
var formdata = new FormData();
formdata.append("project_id", "<CLIENT_GENERATED_UUID>");
formdata.append("asset_id", "<CLIENT_GENERATED_UNIQUE_UUID>");
formdata.append("item_id", "<CLIENT_GENERATED_UUID>");
formdata.append("file", "<FILE_DATA>");
//There are many ways to get the file into the request, whether it be a direct file read via a path, or using a file upload form input. We recommend using a simple file upload input
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: formdata,
redirect: 'follow'
};
fetch("https://ipfs.ordo.so/api/v1/ipfs/add", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));Successful add Response
Sample Failed add Response
Last updated