Skip to content
This repository has been archived by the owner on May 4, 2019. It is now read-only.

image url not working #57

Open
selvamani-subramani opened this issue Apr 17, 2015 · 1 comment
Open

image url not working #57

selvamani-subramani opened this issue Apr 17, 2015 · 1 comment

Comments

@selvamani-subramani
Copy link

when I get the image url through User.first.avatar.url, It generate the url but when I try the url in browser or html, its not showing the image. My model code

has_attached_file :avatar,
    :storage => :dropbox,
    :dropbox_credentials => {app_key: "123445", app_secret: "1234456", access_token: "123456", access_token_secret: "123456", user_id: "191409863"}

  validates_attachment_content_type :avatar, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif"]

It is uploading the file to my dropbox successfully. So when I try User.first.avatar.url, its generates url like this https://dl.dropboxusercontent.com/u/191409863/mclarenp1_QY5vmfTw.jpg when I access this, the page shows dropbox error page instead on image.

@pvchaumier
Copy link

I have the same issue. From what I have read here, this might be that dropbox stopped allowing free users to get a public folder. So either you need to update to pro or you do it privately.

edit :
To solve this issue, you need to set in your model file

:dropbox_visibility => 'private'

And after it should work without any problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants