0

我使用“ https://www.dropbox.com/developers/saver ” Api 并根据文档上传多个文件,我将 base64 字符串列表发送到 Dropbox,但是当只选择一个文件时,我收到错误无法上传上传成功! 

和这里的示例代码 

 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);
4

0 回答 0