Search code examples
jqueryfile-uploaduploadify

why is uploadify (jQuery Plugin) not working ? what is wrong with my code?


i had used this plugin before, but now when i want to use it for another project it simply does not work, where am i going wrong.

here is the code i am using in my root index.php file

<html>
<head>
<link href="/uploadify/uploadify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/uploadify/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/uploadify/swfobject.js"></script>
<script type="text/javascript" src="/uploadify/jquery.uploadify.v2.1.4.min.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
    $('#file_upload').uploadify({
      'uploader'  : '/uploadify/uploadify.swf',
      'script'    : '/uploadify/uploadify.php',
      'cancelImg' : '/uploadify/cancel.png',
      'folder'    : '/uploads',
      'auto'      : true
    });
    });
</script>   
</head>
<body>
<input id="file_upload" name="file_upload" type="file" />
</body>
</html>

and as per the instruction i have put the following file in the uploadify folder in root directory here is the screenshot of theuploadify directory.

alt text

where am i going wrong?

in case you want to check the documentation of the plugin here is the path.

http://www.uploadify.com/documentation/


Solution

  • the problem was the forward slash before the path.