Forum Discussion

Mikevp05's avatar
Mikevp05
New member | Level 1
3 months ago
Solved

0 bytes when uploading PDF through API

I am using Webflow and Wized to upload a file to Dropbox however when I upload the file the response says size 0 and in dropbox it says 0 bytes and I can't open it.  const contentToCapture ...
  • Greg-DB's avatar
    3 months ago

    The Dropbox API /2/files/upload endpoint is a "content-upload" type endpoint, meaning it accepts the file data to upload in the request body (as application/octet-stream). So, when uploading file data that way, make sure your network client is sending the desired file data in the request body.

    We can't provide support for third party platforms or tools themselves such as Webflow or Wized, as those aren't made by Dropbox, so you may need to refer to the documentation for those for information on how to configure them accordingly. Looking at the screenshots you shared though, I see for "Body" you have a Key/Value pair, which may not be the configuration you need, since there wouldn't be any sort of "file" parameter or key; the entirety of the request body should be the raw file data.