Howdy, Stranger!

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

Won't work...
  • I dunno why... I copied and pasted the code straight from the example just to get it working... but it doesnt. Any idea why? Doesn't work in firefox3, safari4, ie7 or 8. Firebug keeps telling me

    Error: invalid label
    Source File: uploadform.php
    Line: 14, Column: 4
    Source Code:
    'uploader' : 'uploader.swf',


    Heres the html code

    <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
    <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">
    <head>
    <title>Photo Gallery</title>
    <meta http-equiv=\"Content-type\" content=\"text/html;charset=UTF-8\" />
    <link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\" />
    <link rel=\"stylesheet\" type=\"text/css\" href=\"js/css/ui.css\" />
    <script type=\"text/javascript\" src=\"js/jquery.js\"></script>
    <script type=\"text/javascript\" src=\"js/base.js\"></script>
    <script type=\"text/javascript\" src=\"js/jquery-metadata.js\"></script>
    <script type=\"text/javascript\" src=\"js/jquery-uploadify.js\"></script>
    <script type=\"text/javascript\">
    $(document).ready(function() {
    'uploader' : 'uploader.swf',
    'script' : 'upload.php',
    'cancelImg' : 'images/cancel.png',
    'auto' : true,
    'folder' : '/uploads'
    });
    </script>
    </head>

    <body>
    <input type=\"file\" name=\"fileInput\" id=\"fileInput\" />
    </body>
    </html>
  • You are missing the vital line that links the element id with the jQuery plugin

    <script type=\"text/javascript\">
    $(document).ready(function() {
    $(\"#fileUpload\").fileUpload({
    'uploader' : 'uploader.swf',
    'script' : 'upload.php',
    'cancelImg' : 'images/cancel.png',
    'auto' : true,
    'folder' : '/uploads'
    });
    });
    </script>
  • I thought that something was missing.. Thanks. The code on the How to Implement page is wrong.
  • Thanks for the heads up. I've just fixed it
  • Ok, I got the button to show up and it seems to upload, but the files go nowhere. It doesn't spit out any errors either. This is confusing, most trouble I've had yet with jQuery....


    $('#fileData').fileUpload({
    'uploader' : 'uploader.swf',
    'script' : 'upload.php',
    'cancelImg' : 'images/cancel.png',
    'auto' : true,
    'folder' : '/pictures/upload'
    });


    The upload folder is chmod to 0755, and upload.php isn't touched at all.
  • It is calling your upload script or otherwise you would be getting IO Error or HTTP 404 error. I'm assuming that your using the default upload script provided with uploadify, unchanged. If that's the case, the problem could lie in your server settings. Add the code in this post http://uploadify.com/forum/viewtopic.php?f=5&t=14 It will report back on some of the php errors that can occur when uploading files.