You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

Douglas16's avatar
Douglas16
Explorer | Level 4
8 years ago

What is the difference between 'upload' and 'create_folder' ?

What is the difference between 'upload' and 'create_folder'?Because I type the 'upload' command passing a folder that don't exist, the command create automatically the folder with the file inside, in my view, the difference to the create_folder is that the create_folder just create an folder, already the 'upload' create the file that you set and the folder, if this don't exist yet...So when I need to upload a file in an determined folder, I don't need type de 'create_folder' command , is just type 'upload' and set the folder name and the file name, is it?

 

And about the 'upload' command, he should not do an upload of a file from the local machine instead of create a file?

 

Thanks for the attention, fellas!

  • Greg-DB's avatar
    Greg-DB
    8 years ago

    The specifics will depend on your system, what language, what library/SDK, if any, you're using etc., but in general you'd use the local path you access the local file using whatever file access API your programming language supplies, and put the read data in the upload API call.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Hi Douglas, it sounds like you have this right. When uploading a file, parent folders are automatically created if they don't already exist, so you don't need to explicitly create them first. The create_folder functionality exists so that you can create folders explicitly if you need them, without uploading any files.

     

    I'm not sure I understand your second question though. Can you elaborate? Thanks in advance! 

    • Douglas16's avatar
      Douglas16
      Explorer | Level 4

      Thanks for the reply, my friend.
      On the second question, let's go:

       

      When I use the upload command, I create a file, right? What I means is: I spected that to use this command I should set a file which is on my local machine and his path, but if I write a file name that does not exist in my local machine the command make the 'upload' even so...So the command is not creating instead of uploading the file?

       

      I hope it has become clear, thanks again!!

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff
        When you upload a file to Dropbox using the Dropbox API, it will create the file in Dropbox, if it doesn't already exist. (If it does already exist, the API can also update the file with the new data.)

        That is unrelated to the state of your local filesystem. When making the upload API call, you can supply data from wherever you want, for example, from a local file, from data in memory, generated on the fly, etc. The Dropbox API only sees the data that you send it, and doesn't know if/how it was stored on your local client.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,910 PostsLatest Activity: 3 days ago
333 Following

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!