Start 2025 on time and up to date! Seamlessly integrate your calendars into Dropbox with these simple steps! 📆

Forum Discussion

h_vohra's avatar
h_vohra
Explorer | Level 4
5 years ago
Solved

Upload files to a specific folder using javascript

I want to upload my files to a specific folder in dropbox, I am using the filesUpload function to upload files. I want that the folder gets created 1st and then the files are stored in that folder.  ...
  • Здравко's avatar
    Здравко
    5 years ago

    :slight_smile: If you aren't sure what my advice mean, better keep your way of coding for now.

    Would be enough to concatenate file name to the folder path. Transform everything in your code which seems:

    dbx.filesUpload({path: '/' + fileName, contents: file})

    To something like:

     

    dbx.filesUpload({path: '/' + folderName + '/' + fileName, contents: file})

    Seems you just forgot it. :wink:

    Hope this helps.