2025 sparked some incredible conversations across our community 👩💻. Discover the highlights and see what’s ahead in 2026.
Forum Discussion
JagsDew
5 years agoExplorer | Level 3
Problem uploading converted image file(.dng) into dropbox
I have an application in node js in which I am uploading the image to the node server after that I compress the file to reduce the size. After that, I upload it to dropbox but the uploaded file has ...
JagsDew
5 years agoExplorer | Level 3
Thank you for your solution. I tried this code with changes but this time even the image file is not uploaded to dropbox. Please find my updated code below.
var namefile= path.basename("C:\\Users\\uploads\\converted\\"+foldername+"\\"+req.file.originalname,".ARW" );
var image =namefile+".dng";
fs.readFile("C:\\Users\\uploads\\converted\\"+foldername+"\\"+image, function(err, data) {
var dbx = new Dropbox({ accessToken: 'XXXX' });
dbx.filesUpload({path: '/'+link+'/'+image, contents: data})
.then(function(response) {
console.log(response);
})
.catch(function(error) {
console.error(error);
});
});I appreciate your help.
Greg-DB
Dropbox Community Moderator
5 years agoHave you checked what the value of your 'data' variable is? Does it contain the expected file contents?
I notice you aren't checking the 'err' variable for the readFile call, so you may not be catching any errors that are occurring when reading the file. You should update your code to check that.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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!