0

i used "https://www.dropbox.com/developers/saver" Api and based on document to upload multiple file i send list of base64 string to Dropbox, but i got an error fail to upload, when select only one file it uploaded successfully! 

and here sample code 

 var options ={files:[]};
      for (var i=0;i< attachments.length; i++) {
        var item = attachments[i];
        var file = {
          url: 'data&colon;application/pdf;base64,'+ item.fileByte
          filename: item.name
        };
        options.files.push(file);
      }

var button = window.Dropbox.createSaveButton(options);
document.getElementById("pdfcontainer").appendChild(button);
3
  • [ Cross-linking for reference: dropboxforum.com/t5/API-Support-Feedback/… ]
    – Greg
    Commented Mar 4, 2020 at 20:27
  • @Greg but for single file it works, i don't like to make full application since just uploading files needed
    – msm2020
    Commented Mar 4, 2020 at 20:29
  • @msm2020 Given that's it's not officially supported, I can't say why it might work for one but not multiple files, but in any case, we don't recommend relying on it as it may break even for one file.
    – Greg
    Commented Mar 5, 2020 at 15:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.