Forum Discussion

bozae's avatar
bozae
New member | Level 2
3 years ago

Error (415) on a file I upload via Dropbox API

I uploaded a .txt file to an app folder via DropBox API with Python. When I try to preview the document, I get an Error (415), and if I attempt to download the txt file via the API, I get an empty file. I would be glad if anyone could help me. 

  • Здравко's avatar
    Здравко
    Legendary | Level 20

    Hi bozae,

    Did you specify some type of content or transport ('Content-Type' and/or 'Content-Encoding' headers) on upload time? If you did, Have you checked for their compatibility?

     


    bozae wrote:

    I uploaded a .txt file to an app folder via DropBox API with Python. ...


    And... no any error as a result!? 🤔

    Try upload again the file with binary type and disable any transport encoding. 😉

    Hope this helps.

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

    bozae As Здравко explained, it sounds like you'll need to debug your upload process. If something doesn't appear to be working as expected, feel free to share the steps and code to reproduce the issue and any unexpected API error/output so we can take a look.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,945 PostsLatest Activity: 45 minutes ago
351 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!