V
V
Viktor Vsk2014-06-22 04:38:11
API
Viktor Vsk, 2014-06-22 04:38:11

How to add access token to paperclip-dropbox?

I registered the application on the dropbox, logged in, the access type is full_dropbox. When uploading a file, everything is correctly saved in the dropbox. But links are generated without tokens and parameters at all. I didn't find much documentation, unfortunately.
Tell me, is this a typical problem or is something wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Vsk, 2014-06-22
@viktorvsk

Either I didn’t figure it out, or it’s really impossible to create a public directory in Dropbox for free after October 2012. You need a pro or business account.
Probably, there was not enough time to figure out what full_dropbox and app_folder are.
This was discussed in paperclip-dropbox: https://github.com/janko-m/paperclip-dropbox/pull/31
However, the documentation somehow doesn't really talk about it.
Decided like this:

def private_url_for <attachment>, style = :original
    <attachment>.dropbox_client.media(<attachment>.path(style))["url"] unless image.nil?
end

Source: https://github.com/dougbradbury/paperclip-dropbox/...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question