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 6245069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:26:30+00:00 2026-05-24T12:26:30+00:00

My web app allows users to record their geolocation data. I need to somehow

  • 0

My web app allows users to record their geolocation data. I need to somehow get that geolocation data into a file so I can put it in s3 storage. I have no idea how to go about this, but the controller already has file uploads to s3 set up using paperclip.

Is there some way to generate a file with javascript and then attach that file when the user clicks save? The other option I was thinking is that I could add a bunch of strings to the body using jQuery .data() method, but then I don’t know how to attach a string as a file in my rails 3 form.

Any help is appreciated.

  • 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-24T12:26:31+00:00Added an answer on May 24, 2026 at 12:26 pm

    maybe you should try out Amazon’s simple db instead of s3 for this? It would be more appropriate than creating files to store data in s3.

    Amazon recently released a ruby sdk for their web services, SDB included:
    https://github.com/amazonwebservices/aws-sdk-for-ruby

    Edit: Or better yet, forget using SDB directly. I had forgotten that that SDK includes an implementation of ActiveModel called AWS::Record. Should make this trivial.

    I’m assuming you’re on Heroku or something and don’t have a method of data persistence?

    edit: looking quickly at paperclip’s assign method, there’s a chance this would work.

    yourmodel.your_paperclip_attachment = StringIO.new(params[:your_posted_geolocation_data])
    

    Paperclip appears to handle creating a tempfile from the stream.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am running a Web service that allows users to record their trips (kind
I'm building a small web app that allows users to list their goals. I
I would like to build a web app that allows users to post THEIR
I have an existing web app that allows users to rate items based on
I'm creating a web app that allows users to enter a number of colors,
I'm working on a web app that allows users to downloaded dynamically generated PDF
I have a web app (java, tomcat) that allows users to generate reports through
I'm current developing web-app that allows a user to associate their account with their
I am making a small web app that allows users to submit html, css
I have a web-app that allows users to upload and download image files by

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.