Howdy, Stranger!

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

when upload complete , how to return uploaded files name?
  • if i want to using multiple upload in a form.

    how to make it when the files is uploaded then submit it to pirnt.php ,

    the pirnt.php will show uploaded files name .

    thank you for your help , if you can tell me . :D
  • You can do it with Uploadify and the onComplete function after uploading:


    $('#upload').fileUpload({
    'uploader': 'uploader.swf',
    'script': 'upload.php',
    'folder': 'temp',
    'cancelImg': 'cancel.png'
    'simUploadLimit' : '1',
    'auto': true,
    'buttonText' : 'Upload',
    'onComplete': function(event, queueID, fileObj, response, data) {
    $('#filesUploaded').html(fileObj.name);
    }
    });
  • first , thank you for your help.
    so , how to send the uploaded files name to print.php ?
    if i using a form

    <script type=\"text/javascript\">
    $(document).ready(function() {
    $('#fileInput').fileUpload({
    'uploader': 'uploader.swf',
    'script': 'upload.php',
    'folder': 'uploads-folder',
    'cancelImg': 'cancel.png',
    'buttonText' : 'UPLOAD IMAGES' ,
    'multi' : 'true' ,
    'onComplete' : function(event, queueID, fileObj, response, data) {
    $('#fileInput').html(fileObj.name);
    }
    });
    });
    </script>
    <form action=\"print.php\" method=\"POST\">
    <input type=\"file\" name=\"fileInput\" id=\"fileInput\" />
    <a href=\"javascript:$('#fileInput').fileUploadStart();\">Upload Files</a> | <a href=\"javascript:$('#fileInput').fileUploadClearQueue();\">Clear Queue</a></div>
    <input type=\"submit\" />
    </form>


    how about when i click a submit , the print.php will print uploaded files list ?

    for the print.php , what can i do will be work?? :cry:
  • By adding an extra hidden formfield wich you give the value of the uploaded image:

    see:

    viewtopic.php?f=5&t=21

    I did it this way in short example:


    'onComplete': function(event, queueID, fileObj, response, data) {
    $('#uploadhidden').val(fileObj.name);
    }

    This will pass the uploaded file name to:


    <input name=\"uploadhidden\" id=\"uploadhidden\" class=\"inputbox\" type=\"hidden\" />
  • :lol: :lol: :lol:
    oh.. that's great , thank you for help .

    ^_^
  • Great! it helps me a lot and save my lots of working
    Thanks