util

util / BackblazeUpload / 0.1.1

README.md

Overview

Upload a file into your Backblaze account which has been preconfigured via util/BackblazeConfig

Usage

Input

ParameterDescription
bucket_namename of a Backblaze bucket you can access
fileData URI of a file you wish to upload
remote_filepath and filename to put into bucket
{
	"bucket_name": "somebucket",
	"file": "data://util/somecollection/somefile.txt",
	"remote_file": "somefolder/somefile.txt"
}

Input: using a specific namespace

util/BackblazeConfig supports storing different configuration files, referred to as namespaces

ParameterDescription
namespaceAlphanumeric namespace defined in via BackblazeConfig
bucket_namename of a Backblaze bucket you can access
fileData URI of a file you wish to upload
remote_filepath and filename to put into bucket
{
	"namespace": "staging",
	"bucket_name": "somebucket",
	"file": "data://util/somecollection/somefile.txt",
	"remote_file": "somefolder/somefile.txt"
}

Output

The URL of the created file (not that it will only be publicly accessible if your bucket is set to "Public")

https://f000.backblazeb2.com/b2api/v2/b2_download_file_by_id?fileId=4_z4caed893f8e6eefd6b690c17_f1106039448e3a8b7_d20181107_m220406_c000_v0001060_t0005