0

I'm using a javascript Dropbox picker script that displays the Dropbox picker window that allows a user to select files and returns a list of selected files. Said script can be found here:

http://codingbin.com/jquery-cloud-storage-file-picker/

The picker I'm talking about is the standard Dropbox picker popup as seen below:

enter image description here

The JSON response is similar to below:

{ 
    isDir: false, 
    name: "test.txt", 
    bytes: 1600, 
    link: "https://dl.dropboxusercontent.com/1/some-hash-here/test.txt", 
    id: "id:QPX-_Anj3-another-hash-here", 
    icon: "https://www.dropbox.com/static/images/icons64/page_white_text.png" 
}

Everything seems to be working for a while but after a few minutes, the link becomes invalid. I am selecting a file that is public shared , BTW.

Another issue is that the icon fields always returns the same image.

Anyone here came across this same problem? Help is greatly appreciated.

2
  • got a link to that plugin? Commented Aug 29, 2017 at 13:07
  • Thank for the reply. I've updated my question. Commented Aug 29, 2017 at 13:16

1 Answer 1

1

Reason for the Invalid link:

If your using direct link of a file then it will expire after four hours which is mentioned here Under Link Types

Reason for the same icon:

Icons are based on the file's extension, here you've chosen the .txt file so obviously icon might be same for all the text type files.

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks for replying. Can you suggest a way I can get a permanent link to the file? As you see, there is no other link to the file in the JSON reponse other than in the link field.
Also, even when picking an image file, the icon is still dropbox.com/static/images/icons64/page_white_text.png
Please refer this page for more detail Dropbox Chooser
The "preview" link type doesn't expire like the "direct" link type does. (The "preview" links can be manually revoked by the user though.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.