views:

1187

answers:

1

Has anyone used this plugin? I don't know if my setup is right, but I think so..

$(document).ready(function() {
$("#uploadify").uploadify({
 'uploader'       : '/extra/flash/uploadify.swf',
 'script'         : '/admin/uploads/artistsphotos',
 'checkScript'    : '/admin/uploads/artistsphotos',
 'cancelImg'      : '/images/cancel.png',
 'folder'         : '/img/artists',
 'queueID'        : 'fileQueue',
 'auto'           : false,
 'multi'          : true,
    'onComplete'     : function(a, b, c, d, e){
        alert(d);
    },  
    'onAllComplete': function(event,data){  
         //something here  
         //alert(data);
     }
});

$('.vla').click(function(){
 $("#uploadify").uploadifyUpload();
 return false;
});
});

If I check with firebug I receive this: http://screencast.com/t/z9PY53bi , but I can't work with the files in php,and I also have enctype=".. on the <form>, but when I check the $_FILES array is empty, is my plugin setup wrong?

+2  A: 

I have used uploadify before. Are you using the most recent version of uploadify?

also you shouldn't need a form tag, the 'script' variable is where the uploader sends the file data. Any other information that needs to be sent with it has to be placed in the 'scriptData' variable. Also, I'm not sure if you can send both the script and the checkScript to the same file that might be what is causing the problem.

The script is the file that processes the upload, the checkScript is a script that ensures that the file is not already on the server.

X3no
The problem, is that where i'm trying to upload the files is a login based thing, so how can I send some data,other then the files, because i have more fields anyway..
Uffo
found it scriptData
Uffo
Yea i mentioned scriptData in my answer. So it works now?
X3no