photonixapp / photonix

A modern, web-based photo management server. Run it on your home server and it will let you find the right photo from your collection on any device. Smart filtering is made possible by object recognition, face recognition, location awareness, color analysis and other ML algorithms.
https://photonix.org/
GNU Affero General Public License v3.0
1.84k stars 124 forks source link

Allow photos to be uploaded via web browser #137

Open damianmoore opened 3 years ago

damianmoore commented 3 years ago

An obvious way for people to import photos would be to allow them to drag-and-drop files from their file manager onto their browser. Also adding an option to upload from the menu would make it more discoverable to other users. See mockup designs in comments below.

AC:

damianmoore commented 3 years ago

User menu upload option Screenshot from 2021-05-25 21-48-21

damianmoore commented 3 years ago

Drop zone view when user is dragging files and about to drop to upload. "Demo Library" should be replaces with name of currently active library. Screenshot from 2021-05-25 21-56-04

damianmoore commented 3 years ago

There is now a branch for this development work - 137-uploading. It has an endpoint that allows files to be uploaded to a library. library_id get parameter must be supplied as well as JWT token as cookie. For testing this you can get the JWT token by being logged into Photonix and copying cookies then using this cURL command with a test image file path.

curl -F 'testimage.png=@/home/user/testimage.jpg' -H 'Cookie: JWT=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImRlbW8iLCJleHAiOjE2MjIwNDYwMzAsIm9yaWdJYXQiOjE2MjIwNDUxMzB9.zI0n2j201PD15hVfi-Bcy3dPwEnwKcqn1Sj3hCOXLQs' http://localhost:8888/upload/?library_id=f70c344e-c94e-4395-a4ca-66f9e1b1b040
damianmoore commented 3 years ago

Icon for upload: https://fonts.google.com/icons?selected=Material%20Icons%3Afile_upload

GyanP commented 3 years ago

Task Done and changes pushed on branch 137-uploading . Branch 192-progress-notifications merged in 137-uploading

kneithamer-rh commented 11 months ago

Hey Damien, was this ever pushed live?