I missed one piece. You'll need to add the following to your config/config.exs file: config :your_app, access_key_id: "fake", secret_access_key: "fake", bucket: "fake", region: "your_s3_region"
Thanks this was very usefull. I have done normal uploads but only read about external uploads. Quick questions: * `consume_uploaded_entries/3` would only invoke after the upload was completed on the client side right? If we attempt to submit the form before the uploads are complete the form submission would wait until the uploads are done, is this understanding correct? I see the docs says "For form submissions, it is guaranteed that all entries have completed before the submit event is invoked" (I am guessing that when we do `entry.progress(100)` on the client side js code it informs the live view server process that the file was uploaded successfully.) * We added the "" in the template so that when editing on form submission we receive the photo url in the params, even if no new photo was uploaded. Is my understanding correct? Suggestion: I would would great if you can also add a link to the repo or the code for the other files in the gist, I mean the the live view module that actual has the handle_event callbacks.
I missed one piece. You'll need to add the following to your config/config.exs file:
config :your_app,
access_key_id: "fake",
secret_access_key: "fake",
bucket: "fake",
region: "your_s3_region"
Thank you! This was very helpful for my own project.
Awesome, thank you for documenting this 🙂
Very welcome!
love the video. any thoughts on how to edit / delete directly from the s3?
Thanks this was very usefull. I have done normal uploads but only read about external uploads.
Quick questions:
* `consume_uploaded_entries/3` would only invoke after the upload was completed on the client side right? If we attempt to submit the form before the uploads are complete the form submission would wait until the uploads are done, is this understanding correct?
I see the docs says "For form submissions, it is guaranteed that all entries have completed before the submit event is invoked"
(I am guessing that when we do `entry.progress(100)` on the client side js code it informs the live view server process that the file was uploaded successfully.)
* We added the "" in the template so that when editing on form submission we receive the photo url in the params, even if no new photo was uploaded. Is my understanding correct?
Suggestion: I would would great if you can also add a link to the repo or the code for the other files in the gist, I mean the the live view module that actual has the handle_event callbacks.
A good guide for setting up Amazon S3: th-cam.com/video/i2JXvgHsV9w/w-d-xo.html
maybe you can bring us the way we can configure the right way the S3
thank you
no link to source code?
Here's the blog post version with code snippets: blog.appsignal.com/2024/03/19/direct-file-uploads-to-amazon-s3-with-phoenix-liveview.html