This endpoint provides a method to upload media files, which may then be referenced in other API endpoints. To add a media file:
file_id chosen by the client.upload_url. Upload the media file to that URL using a standard HTTP PUT request.upload_url).$ curl -i \
-H 'Accept: application/json; version=1' \
-H "Authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjQyLCJpYXQiOjE0NjM2OTQ4MjN9.k48v-R-un93KdIXqp9Zi12JOGJCu8uibtrWjscFCTqc" \
https://api.record360.com/api/users/uploads/new_file_42
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: max-age=0, private, must-revalidate
{
"id": "new_file_42",
"upload_url": "https://r360-uploads.s3.amazonaws.com/users/42/new_file_42?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIXWTV023CFDZ7H1SA%2F20160628%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160628T212443Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=cb91ba9307cbad975cc08495bce3d9113402948f1b67703ff20c58bb58bb090d"
}
$ curl -i \
-H 'Accept: application/json; version=1' \
-H "Authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjQyLCJpYXQiOjE0NjM2OTQ4MjN9.k48v-R-un93KdIXqp9Zi12JOGJCu8uibtrWjscFCTqc" \
https://api.record360.com/api/users/uploads/existing_file_77
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: max-age=0, private, must-revalidate
{
"id": "existing_file_77",
"upload_url": "https://r360-uploads.s3.amazonaws.com/users/42/existing_file_77?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIXWTV023CFDZ7H1SA%2F20160628%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160628T212443Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=cb91ba9307cbad975cc08495bce3d9113402948f1b67703ff20c58bb58bb090d",
"type": "image/png",
"size": 42678
}
| Param name | Description |
|---|---|
|
file_id
required |
File ID, must be unique to the user Validations:
|