uploadifive选择文件,没有任何反应

I've already read many posts on this subject, but none had an answer that works for me.

I'm using uploadifive to upload images. When I select a file, and click open, nothing happens. I get no errors in my console, or when I use onError from uploadifive it self, it also gives me nothing. The onSelect gives me this:

count: 1, selected: 1, replaced: 0, errors: 0 , queued: 1

The onUpload alerts me that there is one file to upload. So I guess it does select the file, but it just won't upload. The uploadScript also doesn't appear in my console/network, so it seems to not even fire that part.

The even weirder part is that I've used uploadifive in another part of my website and there it works fine. But when I copy the code to another part, it doesn't work.

Do I miss something or am I doing something wrong?

EDIT: my code (i've put in every single one function that uploadifive has to see which ones fires and which one doesn't)

$('#mediafile_upload').uploadifive({
'uploadScript'          : '/mediafiles/uploadimage', //waar hij heen gaat
'buttonText'            : '+ Toevoegen',
'width'                 : '140',
'height'                : '100',
'dnd'                   : true,
'multi'                 : true,
'removeCompleted'       : true,
'queueID'               : false,

'onUpload'     : function(filesToUpload) {
    alert(filesToUpload + ' files will be uploaded.');
},
'onAddQueueItem' : function(file) {
    console.log('The file ' + file.name + ' was added to the queue!');
},
'onCancel'     : function() {
    console.log('The file ' + file.name + ' was cancelled!');
},
'onCheck'      : function(file, exists) {
    if (exists) {
        console.log('The file ' + file.name + ' exists on the server.');
    }
},                  
'onClearQueue' : function(queue) {
    queue.css('border', '2px solid #F00');
},  
'onDestroy'    : function() {
    console.log('Oh noes!  you destroyed UploadiFive!');
},          
'onDrop'       : function(file, fileDropCount) {
    console.log(fileDropCount + ' files were dropped onto the queue.');
},              
'onError'      : function(errorType) {
    console.log('The error was: ' + errorType);
},              
'onInit'       : function() {
    console.log('Add files to the queue to start uploading.');
},              
'onProgress'   : function(file, e) {
    console.log('onprogress file: ' + file);
    console.log('onprogress e: ' + e);
},
'onQueueComplete' : function(uploads) {
    console.log(uploads.successful + ' files were uploaded successfully.');
},       
'onSelect' : function(queue) {
    console.log(queue.queued + ' files were added to the queue.');
},      
'onUpload'     : function(filesToUpload) {
    console.log(filesToUpload + ' files will be uploaded.');
},       
'onUploadComplete' : function(file, data) {
    console.log('The file ' + file.name + ' uploaded successfully.');
},
'onUploadFile' : function(file) {
    console.log('The file ' + file.name + ' is being uploaded.');
}        

}); 

This is what my console says: screenshot console

查看全部
duanliang1019
duanliang1019
2013/06/14 08:13
  • uploadify
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复