Start 2025 on time and up to date! Seamlessly integrate your calendars into Dropbox with these simple steps! 📆
Forum Discussion
Tomasmv
2 years agoExplorer | Level 3
Dropbox API in React js
Hi. I am trying to integrate the Javascript API in my React.js project but it is really a headache to integrate because the documentation is not enough, I would need to know how to integrate Dropbox ...
Tomasmv
2 years agoExplorer | Level 3
This is my Github repository, I can't run the functionality to download and upload files via HTTP. I would appreciate a help thanks.
- Greg-DB2 years agoDropbox Staff
Dropbox does not provide code review or debugging services, but we can help with any specific questions or issues you have regarding the Dropbox API if you provide the details.
For example, if you need help with some particular issue on the Dropbox API, reply here with the details of the issue:
- the name and version number of the platform and SDK/library you are using, if any
- the steps to reproduce the issue, including relevant specific code line(s)/snippet(s), but don't include any access or refresh token(s)
- the full text of any error or unexpected output from the Dropbox API
- Tomasmv2 years agoExplorer | Level 3
Hi! This is the error I have using the functionality of uploading a file to my folder path.
C:\wamp64\www\ApiDropbox\server.js:81
'path': `/Apps/CsvFileTomas/${file.name}`, //Path in Dropbox where the file will be saved
^TypeError: Cannot read properties of undefined (reading 'name')
at C:\wamp64\www\ApiDropbox\server.js:81:50
at Layer.handle [as handle_request] (C:\wamp64\www\node_modules\express\lib\router\layer.js:95:5)
at next (C:\wamp64\www\node_modules\express\lib\router\route.js:144:13)
at done (C:\wamp64\www\node_modules\multer\lib\make-middleware.js:45:7)
at indicateDone (C:\wamp64\www\node_modules\multer\lib\make-middleware.js:49:68)
at C:\wamp64\www\node_modules\multer\lib\make-middleware.js:155:11
at WriteStream.<anonymous> (C:\wamp64\www\node_modules\multer\storage\disk.js:43:9)
at WriteStream.emit (node:events:539:35)
at finish (node:internal/streams/writable:754:10)
at finishMaybe (node:internal/streams/writable:739:9)- Tomasmv2 years agoExplorer | Level 3This is the complete function for uploading the file I am using:app.post('/upload', upload.single('file'), async (req, res) => {const accessToken = 'MyToken'const file = req.files// Request to upload the file to Dropboxconst headers = {'Authorization': `Bearer ${accessToken}`,'Dropbox-API-Arg': JSON.stringify({'path': `/Apps/CsvFileTomas/${file.name}`,'mode': 'add', /}),'Content-Type': 'application/octet-stream', //};try {// Realiza la solicitud POST para subir el archivo a Dropboxconst response = await axios.post(uploadUrl, file.data, { headers });res.send('Archivo subido exitosamente.');} catch (error) {console.error(error);res.status(500).send('Error al subir el archivo a Dropbox.');}});
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,936 PostsLatest Activity: 8 hours ago
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 or Facebook.
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!