У меня есть uploadifive uploader, и мне нужно удалить файл с сервера, когда пользователь нажимает кнопку X. Есть идеи? :) Благодаря!Файл UploadiFive удаляет загруженный файл с сервера?
http://prntscr.com/25qdla скриншот содержимого загруженного файла.
текущий код:
$('#file_upload').uploadifive({
'formData' : {
'timestamp' : '<?php echo $timestamp;?>',
'token' : '<?php echo md5('unique_salt' . $timestamp);?>'
},
'fileSizeLimit' : '500MB',
'itemTemplate' : '<p class="files uploadifive-queue-item"><i onclick="removeFile()" class="ico close" style="cursor: pointer;" title="<?=$this->lang->line('modadd_4_filespan_delete');?>"></i><span class="filename"></span><span class="fileinfo"></span></p>',
'queueID' : 'ify_queue',
'uploadScript' : 'uploaders/wv_ify',
'buttonText' : '<a style="margin-top: -7px; margin-left: -16px; height: 38px; width: 132%; cursor: pointer;"><?=$this->lang->line('modadd_4_files_button_text');?></a>',
'method' : 'post',
'fileTypeExts' : '*.rar;*.zip;*.7z;*.scs;',
'onUpload' :function(file) {
$("#msg_error_display, #msg_success_display").hide();
$("#msg_error_display").fadeIn(100, function(){
$(this).find('span').html("<?=$this->lang->line('modadd_4_uploading_files');?>");
});
checker = 0;
},
'onQueueComplete':function(file, data) {
$("#msg_error_display, #msg_success_display").hide();
if(checker == 0){
$("#msg_success_display").fadeIn(100, function(){
$(this).find('span').html("<?=$this->lang->line('modadd_4_uploading_files_end');?>")
});
} else if(checker == 1){
$("#msg_error_display").fadeIn(100, function(){
$(this).find('span').html("<?=$this->lang->line('modadd_4_uploading_files_stop');?>")
});
}
},
'onError' : function(errorType) {
$("#msg_error_display, #msg_success_display").hide();
checker = 1;
},
'onProgress' : function() {
console.log(e.bytesloaded);
},
'onUploadComplete' : function() {
console.log($('.uploadifive-queue-item').find(".fileinfo").html(""));
$("#no_files_uploaded").hide();
uploaded_files += 1;
all_uploaded_files += 1;
}
});