Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Using fileUploadSetting2()
  • Hi,
    I'm new to using uploadify, so the version I'm using is 1.6.2.

    I'm trying to add scriptData to the upload settings using fileUploadSettings(), and my data is not being passed to the upload.php file. When I looked at the source for this method, I found the following:
    fileUploadSettings:function(settingName, settingValue) {
    window.alert('Upload Settings');
    $(this).each(function(settingName, settingValue) {
    document.getElementById($(this).attr('id') + 'Uploader').updateSettings(settingName,settingValue);
    });

    I see that this method is calling another method: updateSettings(), so I did a search in the source file for this method and it is not defined anywhere. In fact this was the only place that the string "updateSettings" was found. I even took a look at the uploadify file on this site http://www.uploadify.com/_scripts/jquery.uploadify.js, and I got the same results.

    Any help would be appreciated.
  • This is not a bug. The function is in the flash file.
  • Thanks, that make sense. Then I must be doing something wrong. Here is my code.

    function uploadifyFile(inputID, fileLinkID) {
    $('input#filename').css('display','none');
    $(inputID).fileUpload({
    'uploader' : '/extension/emc/design/emc/flash/uploader.swf',
    'script' : '/extension/emc/design/emc/upload.php',
    'cancelImg' : '/extension/emc/design/emc/images/cancel.png',
    'auto' : true,
    'folder' : '/extension/emc/design/emc/files',
    'onSelect' : function() {
    var emailAddress = encodeURIComponent($('#email').val());
    window.alert(emailAddress);
    $(inputID).fileUploadSettings('scriptData','&emailAddress='+emailAddress);
    },
    'onComplete' : function(evt, qid, file, resp, data) {
    window.alert(resp);
    $('embed#fileInputUploader').css('visibility','hidden');
    $('input#filename').css('display','inline');
    $('input#filename').attr('value', file.name);
    $(fileLinkID).attr('value', file.filePath);
    }
    });
    }

    I have in upload.php the following:
    echo 'Email: ' . $_GET['emailAddress'] . \"\n\";
    However, when I get the response onComplete the alert has an empty string for the value of "emailAddress". I'm wanting to use the email address that was entered into the form to create a hash string that can be used to make a user specific directory in the files upload folder.