Skip to content
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

Construct public URL for uploads #145

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

egirshov
Copy link

@egirshov egirshov commented Oct 9, 2017

In case uploaded file becomes public-readable (due to bucket or object permissions or in case there is CDN distribution configured), it might be convenient to send object's public URL to the client to avoid going through temporary redirects in s3router.

Also add an option to construct object keys based solely on UUID and don't append original filename.

If 'uniqueFilename' option is specified, newly created object
will be named after generated UUID and original filename is not
used at all.
In case S3 bucket is configured in static website hosting mode,
it is convenient to tell the client the public URL of newly created object
to access it directly (instead of going through s3router redirection).

Also, providing the function instead, it is possible to generate custom URL
for example, if there a CDN or custom domain name configured.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants