
S3api list-objects-v2 -bucket metadaddy-b2 \ It assumes you've set up the profiles as above. Here's a one-liner that copies the contents of a bucket on B2 to a bucket on S3, outputting the filename (object key) and size of each file. Failure to include this argument under these conditions may result in a failed upload due to too many parts in upload. Note that this argument is needed only when a stream is being uploaded to s3 and the size is larger than 50GB. expected-size (string) This argument specifies the expected size of a stream in terms of bytes. One wrinkle is that, if the file is more than 50 GB, you will need to use the -expected-size argument to specify the file size so that the cp command can split the stream into parts for a large file upload.

% aws -profile aws s3 cp s3://metadaddy-s3/hello.txt. | aws -profile aws s3 cp - s3://metadaddy-s3/hello.txt # Copy file from Backblaze B2 to Amazon S3 It's easy to run a quick test on a single file # Write a file to Backblaze B2 | aws -profile aws s3 cp - s3:///filename.ext Note that the first aws s3 cp command also needs the -endpoint-url argument, since it can't be set in the profile: aws -profile b2 -endpoint-url ' \ Now you can specify the profiles in the two aws s3 cp commands. aws configure will prompt you for the credentials for each account: % aws configure -profile b2 The aws s3 cp command can read stdin or write to stdout by using - instead of a filename, so you can pipe two aws s3 cp commands together to read a file from Backblaze B2 and write it to Amazon S3 without it hitting the local disk.įirst, configure two AWS profiles from the command line - one for B2 and the other for AWS.

Shrine.Yes, you can do this using the AWS CLI. “corsRuleName”: “downloadFromAnyOriginWithUpload”,īut it is still blocked, here is our configuration for the s3 presigned url Is there anyway to get around this in shrine? I have made the bucket on backblaze public with the following CORS rules So the presigned upload is being blocked. We have an endpoint for uploading images with S3 buckets, and it works flawlessly, this new upload feature is for video, and we want to reduce our bandwidth cost usage and go with Backblaze, especially considering they have s3 compatible api.Īpparently the CORS option isnt available in the api

We are trying to use Backblaze S3 Compatible API for our presigned upload with shrinerb.
