Our /backblaze/store Robot

Export files to Backblaze

🤖/backblaze/store exports encoding results to Backblaze.

Access

Your Backblaze buckets need to have the listBuckets (to obtain a bucket ID from a bucket name), writeFiles and listFiles permissions.

Usage example

Export uploaded files to my_target_folder on Backblaze:

{
  "steps": {
    "exported": {
      "robot": "/backblaze/store",
      "use": ":original",
      "credentials": "YOUR_BACKBLAZE_CREDENTIALS",
      "path": "my_target_folder/${unique_prefix}/${file.url_name}"
    }
  }
}

Parameters

  • use

    String / Array of Strings / Object required

    Specifies which Step(s) to use as input.

    • You can pick any names for Steps except ":original" (reserved for user uploads handled by Transloadit)

    • You can provide several Steps as input with arrays:

      "use": [
        ":original",
        "encoded",
        "resized"
      ]
      

    💡 That’s likely all you need to know about use, but you can view Advanced use cases.

  • credentials

    Stringrequired

    Please create your associated Template Credentials in your Transloadit account and use the name of your Template Credentials as this parameter's value. They will contain the values for your Backblaze Bucket Name, App Key ID, and App Key.

    To create your credential information, head over to Backblaze, sign in to your account, and select "Create a Bucket". Save the name of your bucket, and click on the "App Keys" tab, scroll to the bottom of the page then select “Add a New Application Key”. Allow access to your recently created bucket, select “Read and Write” as your type of access, and tick the “Allow List All Bucket Names” option.

    Now that everything is in place, create your key, and take note of the information you are given so you can input the information into your Template Credentials.

    ⚠️ Your App Key will only be viewable once, so make sure you note this down.

    While we recommend to use Template Credentials at all times, some use cases demand dynamic credentials for which using Template Credentials is too unwieldy because of their static nature. If you have this requirement, feel free to use the following parameters instead: "bucket", "app_key_id", "app_key".

  • path

    String ⋅ default: "${unique_prefix}/${file.url_name}"

    The path at which the file is to be stored. This may include any available Assembly variables.

  • headers

    Object ⋅ default: {}

    An object containing a list of headers to be set for this file on backblaze, such as { FileURL: "${file.url_name}" }. This can also include any available Assembly Variables.

    Here you can find a list of available headers.

    Object Metadata can be specified using X-Bz-Info-* headers.

Note: The URLs in the result JSON already point to the file on your target storage platform, so you can just save that URL in your database.

Demos