Get a signed upload for one file
POST
/apps/{appId}/uploads
const url = 'https://api.passion.io/v1/apps/example/uploads';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"fileName":"example","mimeType":"example"}'};
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://api.passion.io/v1/apps/example/uploads \ --header 'Content-Type: application/json' \ --data '{ "fileName": "example", "mimeType": "example" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”appId
required
The id of the App, as Studio shows it.
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
fileName
required
The name of the file, with its extension, for example “lesson-1.mp4”.
string
mimeType
required
The MIME type of the file, for example “video/mp4”, “image/png” or “application/pdf”.
string
Examplegenerated
{ "fileName": "example", "mimeType": "example"}Responses
Section titled “Responses”OK
Media typeapplication/json
object
fileId
required
The id that a lesson block takes, after the upload.
string
upload
required
object
url
required
The address to POST the file to.
string
fields
required
The form fields to send before the file.
object
key
additional properties
Examplegenerated
{ "fileId": "example", "upload": { "url": "example", "fields": { "additionalProperty": "example" } }}