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
Mikevp05
2 hours agoNew member | Level 1
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 = document.querySelector('.pdf-content');
html2canvas(contentToCapture, { scale: 0.75 }).then((canvas) => {
const base64image = canvas.toDataURL('image/png');
const pdf = new jsPDF('p', 'px', [canvas.width, canvas.height]);
pdf.addImage(base64image, 'PNG', 0, 0, canvas.width, canvas.height);
const pdfBlob = pdf.output('blob');
v.pdf_data = pdfBlob;
});
Above is how I create the pdf and convert it to a blob. The pdf itself works fine when I download it.
This is how the request is set up.
No RepliesBe the first to reply
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,880 PostsLatest Activity: 2 hours agoIf 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!