-
Notifications
You must be signed in to change notification settings - Fork 19
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
Epic: Upload images to AWS S3
via Phoenix LiveView
#51
Comments
AWS S3
via Phoenix LiveView
@LuchoTurtle as noted on our Standup call: Chris's Our objective with this repo is just to have the most barebones Thankfully you aren't in the dark when approaching this challenge as others have documented some of the steps e.g: |
@LuchoTurtle, as usual, please post comments with your progress and especially when you get stuck. 💬 🙏 |
I'm trying to get a simple file upload to show the files on the web app running but nothing is being shown. I don't know if this is affecting the "file upload" because I'm using the |
I think I fixed it. The reason file import wasn't working it's because the |> allow_upload(:image_list, accept: ~w(video/* image/*), max_entries: 6, chunk_size: 64_000)} on the |
I fixed it. Uploading now works. |
@LuchoTurtle can’t say I understand why CORS would be an issue… are the images being uploaded from the Browser/Client or Server? 💭 |
It's being uploaded from the client, because there aren't any files being saved on the server. However, the pre-signing occurs in the server, which is a necessary step to be able to upload to the That's at least how they do it in the |
Ok. keep going with this approach. (for now, so that you don't lose track) |
Demo is looking good. Please upload screen shots of your progress so others can see. 🙏 |
If you could give me access to search for public applications in Lambda Functions, that'd be awesome :) I'm getting this error:
This oughta do it https://stackoverflow.com/questions/58563456/lambda-creation-error-creating-application-you-are-not-authorized-to-perform-s |
if I search for "serverless" in the IAM permissions there are no results: In Policies: https://us-east-1.console.aws.amazon.com/iamv2/home#/policies |
Apparently you need extra steps to have that policy show up. |
I'm trying to search for public lambda applications in https://eu-west-3.console.aws.amazon.com/lambda/home?region=eu-west-3#/create/application. |
Confirmed 👌 |
At present this repo is just a loose collection of notes and some sample code.
What it should be instead is an end-to-end working example of uploading, compressing, resizing, rotating and cropping images.
Goal
Our goal with image uploads is to be able to seamlessly upload any type of image
have it saved in a reliable place e.g.
S3
(though we can research cheaper comparable options later...)and display that image in our
App
and other places.We want to be able to upload in a
Web
interface and in aFlutter
App.Todo
_archive
directory in case we need to refer to any of it.README.md
to_archive
too so you have a fresh start.LiveView
Uploads Demo:Phoenix LiveView Uploads Deep Dive: https://youtu.be/PffpT2eslH8
Create a new
Phoenix
Project and replicate what Chris but document the stepse.g: https://github.com/dwyl/phoenix-chat-example
Upload images to
AWS S3
: https://gist.github.com/chrismccord/37862f1f8b1f5148644b75d20d1cb073Use a
Content ID
cid
as the image name so that its unique.Once images are uploaded to
S3
, they should be "processed" by aLambda
function.In-browser resizing. This will be it's own
Epic
which will start with research for existing solutions. 🔍Deploy the app to Fly.io: https://fly.io/dashboard/dwyl-image-uploads/ e.g: https://image-upload.fly.dev/ 🚀
If we can get to the point where we are uploading images in a
Phoenix LiveView
App we will already be showing great progress.Don't worry too much about the UI/UX at this stage. Use
TailwindUI
:https://tailwindui.com/components/application-ui/forms/form-layouts
@LuchoTurtle as discussed on standup this morning, this should be the next "big chunk" of work you should attempt to tackle.
If you have questions, please comment. 🙏
The text was updated successfully, but these errors were encountered: