Use this method to temporarily upload a media file so that it can be used by other endpoints. The uploaded file remains available for 1 hour.
client.mediaUpload(data).then(function(result){
});
Name | Type | Description |
---|---|---|
name | string | The name of the media file to be uploaded |
content | integer | A base64 string of the file contents |
This method does not have any optional parameters.
The method returns the ID of the uploaded file. For the full response model, please see the Responses section for the POST /media
endpoint on the Assist API Routes page.
client.mediaUpload(({
name:'<file name>',
content:'<base64 string of file contents>'
}).then(function(result){
console.log(result);
});