Question

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

Was it helpful?

Solution

I kind of answered my own question. I have know idea how, but if I don't use the jquery-uploadifive.js file but the jquery-uploadify.min.js file, it works! The strange part is that I haven't changed a thing in the unminified version.. but well it works. Thanks everyone for helping.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top