Test a resumable upload
POST
/api/items/upload/test
const url = 'https://example.com/api/items/upload/test';const form = new FormData();form.append('file', 'file');form.append('assetId', 'example');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/items/upload/test \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form file=@file \ --form assetId=exampleInitiates a test TUS resumable upload for an asset using multipart/form-data (file + assetId).
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typemultipart/form-data
object
file
File to upload
string format: binary
assetId
required
Target asset ID from createItem
string
Responses
Section titled “Responses”Upload process started
Media typetext/plain
string
Error starting upload
Media typeapplication/json
object
error
required
Indicates an error occurred
boolean
message
required
Error message describing what went wrong
string
Example
{ "error": true, "message": "Item not found"}