Hallo ich versuche, Datei oder Bild in meiner Dropbox mit Dropzone hochladen. und wenn es erfolgreich in meinen Dropbox laden sie beschädigt nur cant Vorschau sein .. Ich habe mich gefragt, ob es ein Problem mit meinem Codes ist in immer eine DateiBild oder Datei beim Hochladen des Erfolgs beschädigt
Dies ist mein Verarbeitungsverfahren innerhalb meines init: function()
this.on("processing", function(file) {
var url = 'https://content.dropboxapi.com/2/files/upload';
var file = dropzone.files[0];
var filename = file.name;
$.ajax({
url: url,
type: 'post',
processData: false,
contentType: 'application/octet-stream',
headers: {
"Authorization": "ACCESS TOKEN",
"Dropbox-API-Arg": '{"path": "/'+filename+'","mode": "add"}'
},
success: function (data){
alert('Success Upload');
/*this.options.url = url;*/
console.log(data);
}
})
});
Sie scheinen die Dateidaten nirgendwo im Upload-Aufruf anzugeben. Hier ist ein Beispiel für das Hochladen auf die Dropbox-API in JavaScript: https://stackoverflow.com/documentation/dropbox-api/409/uploading-a-file/1359/uploading-a-file-viajquery-in-javascript# t = 201701260350392030997 – Greg