Media Upload

Initiate media upload

Generate a pre-signed URL to upload a media file.

post/upload_media

Request

  • Base URL: https://socialbu.com/api/v1
  • URL: https://socialbu.com/api/v1/upload_media
  • Auth: HTTP bearer

Request body

namestring required

File name e.g, ("document.pdf" ,"image.png")

mime_typestring required

File type e.g, ("application/pdf" ,"image/png")

Response

file uploaded

namestring

File name e.g, ("document.pdf" ,"image.png")

mime_typestring

File type e.g, ("application/pdf" ,"image/png")

signed_urlstring

This parameter provides a pre-signed URL to which you should upload your media file using the HTTP PUT method.

To ensure a successful upload, you must set the following headers in your request:

  • Content-Type: Set this header to the MIME type of the file you are uploading (e.g., image/jpeg, video/mp4). This header informs the server about the type of the media content being uploaded.
  • Content-Length: Set this header to be the size of the file being uploaded (bytes).
  • x-amz-acl: Set this to private.
keystring

A unique identifier used to check the upload status.

secure_keystring

File secure key.

urlstring

File public URL.

Changes

No recorded changes to this operation across all 1 revision of this API.