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

siva s's avatar
siva s
Explorer | Level 4
2 years ago

image missing in uploaded pdf

Hi,    I have uploaded pdf file using upload dropbox api..Pdf uploaded successfully.But Attached image not showing in uploaded pdf..
  • Greg-DB's avatar
    Greg-DB
    2 years ago

    siva s Thanks for following up with the information. I see you're using /2/files/upload to upload files. The /2/files/upload endpoint is a "content-upload" style endpoint, meaning that it takes the raw data to upload in the request body.

     

    Dropbox does not modify the file data you supply when uploading to the Dropbox API like this, so make sure you're supplying the exact correct file data in your API call. Looking at your code, it looks like that would be in your 'newpdf' variable, coming from 'doc.output()', so make sure that variable contains the complete PDF data that you're expecting when you run that particular code.

     

    Otherwise, while Dropbox itself won't change the data you upload, different PDF viewers work differently, so this may be a matter of where/how you're viewing the contents of the PDF file. For example, if you view a file on www.dropbox.com and view the same file in an app locally but they display differently, that would be more a matter of how the PDF viewer works. If that's the case, and you're having trouble with the PDF viewer on www.dropbox.com in particular for the same exact file that works elsewhere, I suggest opening a thread in "View, download, and export" instead. (This "API Support & Feedback" section of the forum is only for the Dropbox API itself.)

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,882 PostsLatest Activity: 2 hours ago
325 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!