Backblaze File Storage
Backblaze CLI
Section titled “Backblaze CLI”https://www.backblaze.com/docs/cloud-storage-command-line-tools
Authentication
Section titled “Authentication”b2 account authorizeThen enter the account key ID and key secret when prompted.
Updating CORS Settings
Section titled “Updating CORS Settings”To update the CORS settings for your Backblaze file storage, follow these steps:
- Log in to your Backblaze account.
- Create a json file at the root of your terminal.
[ { "allowedHeaders": [ "*" ], "allowedOperations": [ "s3_head", "s3_put", "s3_post", "s3_get" ], "allowedOrigins": [ "http://localhost:8000", "http://127.0.0.1:8000", "http://localhost", "http://127.0.0.1", "http://localhost:5173", "http://127.0.0.1:5173", ], "corsRuleName": "browserUploads", "exposeHeaders": [ "etag", "x-bz-content-sha1" ], "maxAgeSeconds": 3600 } ] [ { "allowedHeaders": [ "*" ], "allowedOperations": [ "s3_head", "s3_put", "s3_post", "s3_get" ], "allowedOrigins": [ "https://domain.com" ], "corsRuleName": "browserUploads", "exposeHeaders": [ "etag", "x-bz-content-sha1" ], "maxAgeSeconds": 3600 } ]- Run the following command to update the CORS settings:
b2 bucket update --cors-rules "$(<./{<path_to_file>})" <bucket_name>