Jhourlad Estrella
Jhourlad Estrella

Reputation: 3690

Dropbox API file URL invalid

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.

Upvotes: 0

Views: 142

Answers (1)

Vel
Vel

Reputation: 81

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.

Upvotes: 1

Related Questions