-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convenience function to make private files public #4325
Comments
@ajhool Do you have an example of this working out in the world? It seems like if an image/file is set to private, there would be a reason for this correct? Just want a little more context for this is all. Thanks ahead of time! |
Oftentimes in applications a file will go through a "Draft" stage before a "Publish" phase. For instance, a text document might be stored as a text file before it is finally published (see, medium.com). That would be a private -> public transition. Or a photo sharing website might have private photos that you can choose to share with friends or choose to make public. In my specific application, users have photo albums that are almost always private; but there is a feature that allows the user to "publish" their photo album so that the general public can rate the photos in the album. That would be a transition from private to public. |
This sounds like a valid use case, there are two ways to accomplish this:
If we did this, I would imagine that it should be a generic For the time being this is possible using the existing Storage APIs but lets leave this issue open to get some feedback for future work. |
Up! |
hi folks! You can now accomplish this via the |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Is your feature request related to a problem? Please describe.
A common use-case is to have private files that are "published" and made to be public.
Describe the solution you'd like
I think the simplest way to do this with the aws-sdk is a client-side call to
s3.copyObject
where (altough, this would not gracefully handle interruptions). If these functions were added to Storage, the methods might be:The text was updated successfully, but these errors were encountered: