Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
diego_gecko
7 years agoNew member | Level 2
https://content.dropboxapi.com/2/files/get_preview issue 409
Hello.
I'm trying to get a preview of files stored in shared Dropbox folder, I'm working on JS and I'm getting this error 409 : path not found.
This is my script::
var dropboxToken = "My_token";
$.ajax({
url: "https://content.dropboxapi.com/2/files/get_preview",
type: 'POST',
cache: false,
//dataType: 'json',
headers: {
'Authorization':'Bearer ' + dropboxToken,
'Content-Type': "application/octet-stream",
'Dropbox-API-Arg': JSON.stringify({
".tag": "path",
"path": "/Pruebas_liveChat/livechat-visual2+(5).pdf//",
}),
//"path": '/Pruebas_liveChat/livechat-visual2+(5).pdf',
},
error : function(err){
console.log(err);
},
success : function(code) {
console.log(code);
},
});
1 Reply
- Greg-DB7 years ago
Dropbox Community Moderator
You can find the documentation for each of the errors for this endpoint here:
https://www.dropbox.com/developers/documentation/http/documentation#files-get_preview
For example, click on 'path' under 'PreviewError' to see that 'path/not_found' means "There is nothing at the given path", and 'path/not_file' means "We were expecting a file, but the given path refers to something that isn't a file.".
I recommend using /2/files/list_folder[/continue] to make sure you are using the correct paths:
https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder
https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!