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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:05:14+00:00 2026-06-14T23:05:14+00:00

I have an ipad app that uses dropbox to sync images to the cloud

  • 0

I have an ipad app that uses dropbox to sync images to the cloud so that i can access them with a webapp and process them etc etc.

the part i’m having trouble with is getting the file from dropbox to s3 via carrierwave. i have a photo model and i can create a new photo and upload and an image successfully. I can also put a file on dropbox. However when i try to get a file off of dropbox and put it on s3, the contents of the file is just text.

Are there some sort of mime types i need to set or something?

I am using dropbox_sdk and the get_file_and_metadata method. It returns me the file object successfully, but the contents are all just text. this is me hard coding the image file so i can be sure it exists..

dbsession = DropboxSession.deserialize(session[:dropbox_session])
@client = DropboxClient.new(dbsession, ACCESS_TYPE) #raise an exception if session not authorized
@info = @client.account_info # look up account information
@photo = Photo.new(params[:photo])
@db_image metadata = @client.get_file_and_metadata('/IMG_1575.jpg')

the part i don’t know how to do is say take this image @db_image and use that file when creating a new photo and store it on S3.

I’m thinking it might be a ‘mime type’ issue, but i’ve read that that is only based on the file ext.

any insight you guys could share would really help me get past this hurdle. thanks!

  • 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-06-14T23:05:15+00:00Added an answer on June 14, 2026 at 11:05 pm

    Figured this out. Instead I used the direct_url.url method that is part of the dropbox-api gem used with the carrierwave gem. the direct_url.url method returns a secure full url path to that file that you can use as the remote_url value for carrierwave.

    @client = Dropbox::API::Client.new(:token  => 'derp', :secret => 'derp')
    @dropbox_files = @client.ls "images/#{@event.keyword}/#{photo_size}/"
    
    @dropbox_files.each do |f|
      photo_exists = Photo.where(:dropbox_path => f.direct_url.url).count
      if photo_exists == 0
        @photo = Photo.create(:remote_filename_url => f.direct_url.url, 
                              :dropbox_path => f.direct_url.url,
                              :event_id => @event.id)
      end
    end
    

    Now, i’m pretty new at ruby, so i’ll be posting a better way to step through the results, as that seems pretty slow and clunky.

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

Sidebar

Related Questions

I have an iPad app that uses custom fonts though the UIAppFonts elements in
I have an iPad app that uses Core Data for data storage. I would
I have an app that uses NASA live TV stream for the iphone/ipad which
I have an iPad app that uses Core Data with Sqlite. I keep getting
Using iOS 4.3 on an ipad app I have a custom NSOperation that uses
I have an iPad app that uses the storyboard board feature and then I
I'm trying to build an iPad app that uses custom images as buttons with
I have a split view controller-based iPad app that uses a Web View to
I have an iPad app that has a UITableViewController that implements the NSFetchedResultsControllerDelegate .
I have this iPad app using Storyboard. There are some file that are marked

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.