How to put a file to Wasabi S3?
Closed this issue · 5 comments
artknight commented
I am trying to put a file to s3.wasabisys.com
instead of amazon. Their compatibility with Amazon is 100%.
Where is the code below can i specify the different end-point?
aws = new aws(
awsKey = 'YOUR_PUBLIC_KEY',
awsSecretKey = 'YOUR_PRIVATE_KEY',
defaultRegion = 'us-east-1'
);
zipFileData = fileReadBinary('myfile.zip');
aws.s3.putObject(bucket = 'mybucket', objectKey = 'xxxx', fileContent = zipFileData);
jcberquist commented
Hi, you should be able to do this by using the constructorArgs
with a host setting for s3:
aws = new aws(
awsKey = 'YOUR_PUBLIC_KEY',
awsSecretKey = 'YOUR_PRIVATE_KEY',
defaultRegion = 'us-east-1',
constructorArgs = {
s3: {
host: 's3.wasabisys.com'
}
}
);
artknight commented
@jcberquist perfect! Thank you Sir!
artknight commented
@jcberquist sorry to bother ... is there any way to create folders within buckets? If yes, what would the code for that look like?
jcberquist commented
Have you looked at this? https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-folders.html - basically there aren't really any folders on AWS S3 (or an equivalent service) - but you can try putting a zero length object with a key name ending in /
to emulate a folder.
artknight commented
Yes Sir, I had found a post talking about it and got it resolved. Thank you!
…On Tue, Dec 7, 2021 at 2:30 PM John Berquist ***@***.***> wrote:
Have you looked at this?
https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-folders.html
- basically there aren't really any folders on AWS S3 (or an equivalent
service) - but you can try putting a zero length object with a key name
ending in / to emulate a folder.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABGQQRXZTPVHH7KNNTUST3UPZOERANCNFSM5JK6ND7A>
.