-
-
Notifications
You must be signed in to change notification settings - Fork 791
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
S3 upload custom endpoint url #244
base: main
Are you sure you want to change the base?
S3 upload custom endpoint url #244
Conversation
Add endpoint param to the call to enable custom endpoint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution here @peppelauro. What happens if the user wants to use Amazon S3 and not a custom endpoint or 3rd-party provider? Could this possible be confusing for them? Shouldn't we add some comments in the files or docs to explain what's going on? What do you think?
@vincanger good observation, what if we check the existence of the env AWS_S3_ENDPOINT_URL? If it doesn't exists then use S3Client as usual (amazon default, no endpoint required), else use it in the client, something like follow:
|
And of course, in case you validate the previous snippet, we will add a commented line in the .env.server: ` (OPTIONAL) get your aws s3 credentials at https://console.aws.amazon.com and create a new IAM user with S3 access#If you want to use a non-amazon S3 decomment the following line: |
@peppelauro on second thought, I think it's too confusing to add the conditional code and optional env variable to the template. I think it's best if we don't clutter it too much. We can only offer so many integrations and examples for the user, so if the user wants to use something else besides AWS S3, that's up to them to figure out how to integrate it. With that said, what do you think about adding a section to the "File Upload" docs, e.g. "Using a non-Amazon S3 provider (OVH, DigitalOcean)" that includes this information and code snippet? |
I understand but the user will have to modify the source code to enable that feature is it? No problem, I will specify with an "how to" into the doc :) |
Description
Contributor Checklist