This forum is a community forum meant for users of the plugin to collaborate and help solve issues with implementation, etc. Unfortunately, as the creator of the plugin, I do not have much time to attend to every request here as this is only a side project and I must work a full-time job to provide for my family. This is how I keep the Flash version free and the HTML5 version low cost.
UploadiFive 1.1.1 has been released which includes a small fix for added support on touch devices including iOS 6 devices.
formdata and function
  • Hi :)

    I have a field into a form, and I want to get the value entered and change the name of the uploaded file to the value of the field.

    I added a function to get the name, and if I test it alone it is working.

    I made this :


    function gamename_fonction(){
    var game_name = $('#game_name').val();
    return game_name;
    }

    $(function() {
    $('#file_upload').uploadify({
    'swf' : '/admin/ajax/uploadify.swf',
    'uploader' : '/admin/ajax/uploadify.php',
    'checkExisting' : '/admin/ajax/check-exists.php',
    // Your options here
    'method' : 'post',
    'formData' : { 'someKey' : 'gamename_fonction()' } ,
    });
    });


    But the problem is that the value of $_POST['someKey'] is gamename_fonction() !! (and not the value that is normally returned.

    Please can you tell me what I am doing wrong and fix this?

    thx
  • SOLVED !! :)

    $(function() {
    $('#file_upload').uploadify({
    'swf' : '/admin/ajax/uploadify.swf',
    'uploader' : '/admin/ajax/uploadify.php',
    'checkExisting' : '/admin/ajax/check-exists.php',
    // Your options here
    'method' : 'post',
    'formData' : { 'someKey' : '' } ,
    'onUploadSuccess' : function(file, data, response) {
    alert('The file ' + file.name + ' was successfully uploaded with a response of ' + response + ':' + data);
    },
    'onUploadStart' : function(file) {
    $('#file_upload').uploadify('settings', 'formData', {'someKey' : $('#game_name').val() });

    }

    });
    });