Open valerykalashnikov opened 7 years ago
Can you think of a good way to do this? Since Stow is an abstraction, it's tough to add new concepts without them being supported across the board.
@TamalSaha @Xercoy @piotrrojek Do you have any ideas how this might be solved?
I will try to explain my case. I tried to use Stow to upload files that would be accessible by a public link. But I didn't find the way how to do it without setting proper ACL. Only by setting proper checkboxes near to each uploaded file in a Google Cloud web interface.
Yes we want to support that, for sure.
On 17 Mar 2017, at 17:43, Valery notifications@github.com wrote:
I will try to explain my case. I tried to use Stow to upload files that would be accessible by a public link. But I didn't find the way how to do it without setting proper ACL. Only by setting proper checkboxes near to each uploaded file in a Google Cloud web interface.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/graymeta/stow/issues/121#issuecomment-287423715, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGNG_X5YHEq12GMWFZ8yOic8BcOiqVDks5rmsZNgaJpZM4LzyTt.
I think that it can be a separate method to method to make an item public and later make it private. Also, there can be a method to get a signed URL for an item which are shareable for predefined time window. All of these are possible for AWS/GCS/Azure.
The shared public URL thing sounds good to me, if most things support it.
Alternatively, what about putting a public method in the implementation packages:
package google
// GetPublicShareURL gets a publicly accessible share URL good for the
// specified timeout.
func GetPublicShareURL(item stow.Item, timeout time.Duration) (string, error) {
// TODO: get the URL
}
This way, the implementations can have specific things without it affecting the Item interface.
Now it's unable to save file with "publicRead" ACL to Google Cloud storage using stow.
For example when uploading to Google Cloud using official library it is possible to set ACL this way: