cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Musicians, convert your MuseScore files to PDF to play music on the go! Learn more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create empty file without uploading

Create empty file without uploading

chacychavez
Explorer | Level 4
Go to solution

Is it possible to create an empty file without having to upload a local file?

I'm trying to make `/file/upload` endpoint work with .docx files but when i'm trying to check the file on the web, it says it is unsupported.

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

The Dropbox API doesn't offer a call specifically to just create an empty file, but you can call /file/upload with an empty body to make an empty file (that is, with a size of 0).

 

A file with a size of 0 isn't a valid .docx file though, so if you mean you want to upload a valid .docx document that just doesn't contain any content, you'd need to create that locally and then upload the (non-zero length) data.

View solution in original post

1 Reply 1

Greg-DB
Dropbox Staff
Go to solution

The Dropbox API doesn't offer a call specifically to just create an empty file, but you can call /file/upload with an empty body to make an empty file (that is, with a size of 0).

 

A file with a size of 0 isn't a valid .docx file though, so if you mean you want to upload a valid .docx document that just doesn't contain any content, you'd need to create that locally and then upload the (non-zero length) data.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?