Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6546415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:42:18+00:00 2026-05-25T11:42:18+00:00

Possible Duplicate: Store Blob in Heroku (or similar cloud services) I realize that Heroku

  • 0

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:42:19+00:00Added an answer on May 25, 2026 at 11:42 am

    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:

    AWSCredentials awsCredentials = new BasicAWSCredentials(System.getenv("AWS_ACCESS_KEY"), System.getenv("AWS_SECRET_KEY"));
    AmazonS3 s3Client = new AmazonS3Client(awsCredentials);
    s3Client.createBucket(BUCKET_NAME);
    String s3Key = UUID.randomUUID().toString();
    s3Client.putObject(BUCKET_NAME, s3Key, attachment);
    Document doc = new Document(comment, s3Key, attachment.getName());
    doc.save();
    listUploads();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: PHP 2-way encryption: I need to store passwords that can be retrieved
Possible Duplicate: How can I store Perl's system function output to a variable? I
Possible Duplicate: Get and Parse CSV file in android I would like to store
Possible Duplicate: Datatype/structure to store timezones in MySQL I'll be storing only UTC times
Possible Duplicate: How or where should I store object instances that I require globally
Possible Duplicate: PHP 2-way encryption: I need to store passwords that can be retrieved
Possible duplicate: How can i give app store link in my apps before approving
Possible Duplicate: Using ApplicationSettings to store Checked property for WinForms RadioButtons I have three
Possible Duplicate: Is it ever ok to store password in plain text in a
Possible Duplicate: What is the best way to store user settings for a .NET

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.