Upload photo/video/document using mix phx.gen.html

i’m new in elixir and want to know how to upload a photo/video/Document using mix phx.gen.html, just for my training, is there any posibble of this?

like
-title
-description
-file (photo/video/document)

this is my Phoenix installer v1.7.2
Thankyou, appreciate a lot for you who answering

https://hexdocs.pm/phoenix/file_uploads.html

https://fullstackphoenix.com/tutorials/fileuploads-to-s3-with-waffle

2 Likes

thats interesting, but is that any available tutorial to save the file in our hosting or desired folder?

The first one moves it to a tmp folder on the server and gives you the path so you can just do a file copy. In the second case Waffle comes with a local storage plugin so you’d just swap that out. Documentation should be on Waffle github repo.