capabilities.work

Upload a File

A 3-step recipe with Backblaze. We can help you get access.

Recipe · 3 steps

Upload a File

Upload a single file to a bucket via a freshly issued upload URL.

  1. Log in to the B2 API to obtain the authorization token required before an upload URL can be requested.
  2. Request an upload URL and a short-lived upload authorization token scoped to the target bucket.
  3. Upload the file content to the bucket-specific upload URL using the upload authorization token and the required X-Bz content metadata headers.
What you'll need to have ready
  • bucketId: The ID of the bucket to upload the file into.
  • fileName: URL-encoded name of the file (e.g. photos%2Fimage.jpg).
  • contentType: MIME type of the file being uploaded.
  • contentLength: Length of the file content in bytes.
  • contentSha1: SHA1 checksum of the file content.
  • fileContent: The raw file bytes to upload as the request body.
For your developer

Arazzo workflow backblaze:upload-file, 3 operations: authorizeAccount → getUploadUrl → uploadFile. Specs on APIs.io.