Reputation: 10095
There is a website, and we want to allow users to upload files for their entities.
We managed to make a form which uploads files to s3 directly from browser.
However, it is not very reliable for at least two reasons:
What's your strategy with dealing with such files? Or we should just give up and upload to s3 from our web application?
Upvotes: 2
Views: 481
Reputation: 2191
Post upload redirects is the way that your application gets notified. Why is this not working for you? If using the post directly to Amazon from your form method, there is no alternative notification.
You can put in place restrictions or controls on the files that are uploaded using the hidden field values that are required in the form (ie. key, Content-Type, etc.) You can even rename the name a file is saved as using the "key" hidden field.
Using the above concepts and also implementing some client side validation should achieve what you need in most cases.
Depending on the technology are resources you have available, uploading through the web application can tie up resources, particularly if large file uploads are allowed. This is the big advantage to direct to S3 uploads.
Upvotes: 3