PlayWithMagic / PlayWithMagic.org

PlayWithMagic.org is a web application that catalogs magic tricks and helps magicians build shows.
http://playwithmagic.github.io/PlayWithMagic.org/
Apache License 2.0
2 stars 1 forks source link

Upload and process images in Play #40

Closed davidkneely closed 9 years ago

davidkneely commented 9 years ago

I initially created the createUser.html page with input fields. Then I updated some of them to textareas. Now I want to update the image upload feature.

You guys have any suggestions for image upload fields? I'm thinking of making something like the image upload field in the advanced section on this page: http://plugins.krajee.com/file-input/demo

marknelsonengineer commented 9 years ago

I just ran across this Play API for uploading content.

https://www.playframework.com/documentation/2.3.x/JavaFileUpload

Mark

pkarjala commented 9 years ago

I'll look over this tonight and get working File Upload object.

pkarjala commented 9 years ago

This is the most in-depth tutorial on file uploads I've been able to find: https://devcenter.heroku.com/articles/using-amazon-s3-for-file-uploads-with-java-and-play-2

pkarjala commented 9 years ago

Functional testing for image uploads: http://hosseinkaz.blogspot.com/2014/11/test-file-upload-in-playframework2-java.html

pkarjala commented 9 years ago

This appears to be a potentially simpler way to process this: https://www.playframework.com/documentation/1.2.x/jpa

pkarjala commented 9 years ago

According to Prof. Johnson, we should hold off on worrying about Image uploads / hosting until the Database portion of the class during Milestone 2. For the Milestone 1 implementation, we can use static files, but they still have to be relevant to the context, IE, not the same generic image for everything.

Store these in public/images/milestone1.

Keep filenames as follows:

"magicianName.imgtype" "routineName.imgtype"

pkarjala commented 9 years ago

Some more info on this that I've researched:

As previously mentioned: https://www.playframework.com/documentation/2.3.8/JavaFileUpload

Returning uploaded file objects to the user: https://www.playframework.com/documentation/2.3.8/JavaStream

pkarjala commented 9 years ago

David is a beast. This is resolved.