2017-06-13 68 views
0

我使用下面的代碼片段上傳文件到Dropbox的覆蓋選項的Dropbox文件上傳JavaScript API?

dbx.filesUpload({path:"/"+file.name, contents:content}) 
    .then(function(response) { 
     console.log(response); 
    }) 
    .catch(function(error) { 
     console.error(error); 
    }); 

這只是工作按預期向前拋出一個路徑衝突錯誤第二次,因爲該文件已經存在。如何在filesUpload()中將覆蓋選項設置爲true?

回答