Possible Duplicate:
Store Blob in Heroku (or similar cloud services)
I realize that Heroku has a read-only file system, and have looked at SO questions about attachment_fu and other similar Ruby gems for handling file uploads in a transitory way so that they never really hit disk (other than temp) until they get written to Amazon S3. However, I’d like to use the Play Framework (Java) for my upcoming project, and need to support uploading pictures to a gallery.
Obviously I’ll need to use a writable backing store like S3 or a database blob field: I’m not married to either one as long as it works for a low volume web site (several hundred requests per month). Has anyone done this with Play on Heroku? I’m new to Play Framework, and new to Heroku, so even really obvious answers would help!
I put an example of how to do this with Amazon S3 on github:
https://github.com/jamesward/plays3upload
Basically you just need to send the file to S3 and save the key in the entity: