Update upload.js with 200 status for delete
This commit is contained in:
parent
7f2db43108
commit
335517bf17
|
@ -48,7 +48,7 @@ Dropzone.options.dropzone = {
|
||||||
xhr.open("DELETE", resp.url, true);
|
xhr.open("DELETE", resp.url, true);
|
||||||
xhr.setRequestHeader("X-Delete-Key", resp.delete_key);
|
xhr.setRequestHeader("X-Delete-Key", resp.delete_key);
|
||||||
xhr.onreadystatechange = function(file) {
|
xhr.onreadystatechange = function(file) {
|
||||||
if (xhr.status === 404) {
|
if (xhr.status === 200) {
|
||||||
file.leftElement.innerHTML = 'Deleted <a target="_blank" href="' + resp.url + '">' + resp.url + '</a>';
|
file.leftElement.innerHTML = 'Deleted <a target="_blank" href="' + resp.url + '">' + resp.url + '</a>';
|
||||||
file.leftElement.className = "deleted";
|
file.leftElement.className = "deleted";
|
||||||
file.rightRightElement.onclick = null;
|
file.rightRightElement.onclick = null;
|
||||||
|
|
Loading…
Reference in New Issue