I am using Jquery-File-Upload plugin. When plugin is loaded I add already preloaded files with this code:
var files = [
{
"name": ""+uploadFileName+"",
// "size":775702,
"type": "audio/ac3",
"url": ""+uploadFile+"",
"deleteUrl": ""+uploadFile+"",
"deleteType": "DELETE"
}
];
var $form = $('#fileupload');
// Init fileuploader if not initialized
// $form.fileupload();
$form.fileupload('option', 'done').call($form, $.Event('done'), {result: {files: files}});
Everything works fine - plugin add file to the fileslist but in this case (with manually preload) DELETE button doesn't work and doesn't delete the file.
In console I see the error: DELETE (*url_link*) 405 (Method Not Allowed)".
Anyone knows how to fix this problem and what kind of problem is it?
P.S. I don't create manually these delete buttons both ways. But with uploading new file I can't delete file and I can't when trying to delete the old one.
Any help will be helpful!