mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2026-02-03 06:03:25 +00:00
Add ACL options for s3 upload #226
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JackDallas on GitHub.
I'm using Digitaloceans spaces s3 compatible storage, unfortunately they don't offer a way to set the ACL for the whole bucket.
A
--s3-acloption that could be set topublicwould make transfer.sh work with this.I couldn't see a way to do this but if one exists please feel free to correct me :)
@paolafrancesca commented on GitHub:
@JackDallas but if the items are created private by default with the aws credentials of transfer.sh I expect that after the same client with the same credentials will be able to access the items again
what am I missing?
@paolafrancesca commented on GitHub:
@JackDallas can you explain in more details?
transfer.sh doesn't create the bucket it writes into. why don't you just create it as public?
@paolafrancesca commented on GitHub:
@JackDallas sorry but it is still not clear
where do you set the base url? as
--s3-endpointto transfer.sh?what is exactly not working?
why the item need public perms?
@JackDallas commented on GitHub:
So Digitalocean don't let you set a bucket wide policy it has to be set per item and items are private by default so you have to include the ACL policiy when you upload an item
@JackDallas commented on GitHub:
ohhhh,
So I set the base url to be the CDN provided with the bucket for faster access:
https://bucketname.region.digitaloceanspaces.comSo the link given back to the client is a direct one and the item needs public perms, this may not be a use case covered by transfer.sh, I was going to try forking and having a go adding it once I had a chance to understand the aws library
@JackDallas commented on GitHub:
Sorry let me re-phrase
Digital ocean provides a S3 service with built in CDN, so the bucket address is
<bucketname>.<region>.digitaloceanspaces.combut the CDN endpoint is on<bucketname>.<region>.cdn.digitaloceanspaces.com.So my settings are
--s3-endpoint=<bucketname>.<region>.digitaloceanspaces.com--proxy-path=<bucketname>.<region>.cdn.digitaloceanspaces.comSo the link I get back from transfer.sh is accurate being
<bucketname>.<region>.cdn.digitaloceanspaces.com/<randID>/<filename>But because all Digitalocean buckets default to private the file is un-accessable
@paolafrancesca commented on GitHub:
@JackDallas is this still an issue?
@paolafrancesca commented on GitHub:
@JackDallas any answer from them to the ticket?
@paolafrancesca commented on GitHub:
@JackDallas now it is clear
there is a question on digitalocean community forum about this issue:
https://www.digitalocean.com/community/questions/how-to-set-spaces-acl-to-public
unluckily no answer. before adding the feature in transfer.sh I would ensure that no solution is given directly on digitalocean side.
have you already opened a ticket/asked them the way to solve?
@JackDallas commented on GitHub:
I'll open a ticket now to be sure!
I tried
put-bucket-acllike the person in that ticket did but no luck, and searched all the docs@JackDallas commented on GitHub:
Really sorry for the delay, the world went a bit crazy and dragged me with it, it seems this is something that can be done on digital ocean it just isn't easy, the feature could be useful if you want to create public files in a default by private bucket, I may re-visit this one day but for now it's not a top priority thing