adam
adam

Reputation: 21

Uploadify does not display button

I'm trying to make uploadify 3.0 (jQuery based file uploading script) work, however seems I cant. Here's how I'm using it:

<script type="text/javascript" src="jquery.uploadify.min.js"></script>
<script type="text/javascript" src="jquery-1.5.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#file_upload').uploadify({
'swf' : 'uploadify.swf',
'uploader' : 'uploadify.php',
'cancelImg' : 'uploadify-cancel.png',
'folder' : 'uploads',
'auto' : true
});
});
</script>

And here's html part:

<fieldset style="border: 1px solid #CDCDCD; padding: 8px; padding-bottom:0px; margin: 8px 0">
        <legend><strong>Uploadify - Single and Multiple Sample</strong></legend>

        <h2>Multiple File Auto Upload</h2>
        <p>Images Only</p>

      <input id="file_upload" name="file_upload" type="file" />

        <p></p>
    </fieldset>

Thanks for the help.

Upvotes: 1

Views: 4508

Answers (3)

insoftservice
insoftservice

Reputation: 840

Its flash package which has got updated in different browser. Just allow flash on all sites and refresh the site it would work.It worked for me. Please do let us know if someone has any better solution For reference https://support.google.com/chrome/answer/6258784?co=GENIE.Platform%3DDesktop&hl=en

Upvotes: 0

digiguru
digiguru

Reputation: 12829

I've found Uploadify doesn't work with older versions of jQuery. Not sure if you'll find the same - give it a go.

This one worked for me...

<script type="text/javascript" src="jquery.uploadify.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#file_upload').uploadify({
'swf' : 'uploadify.swf',
'uploader' : 'uploadify.php',
'cancelImg' : 'uploadify-cancel.png',
'folder' : 'uploads',
'auto' : true
});
});
</script>

Upvotes: 1

hardba11
hardba11

Reputation: 1516

I see several things that raise an eyebrow for me. First is that I see no reference to the swfobject script. You should have a line similar to this.

<script type="text/javascript" src="/swfobject.js"></script>

or there is a freely hosted version here

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"></script>

Also I don't see a reference to the uploadify .css file which determines the Upload button's location, image, etc.

<link href="/uploadify/uploadify.css" type="text/css" rel="stylesheet" />

And it looks like you have all file paths looking at the root directory, is that correct for your project? Do you really have uploadify.swf, uploadify.php, and uploadify-cancel.png in the same directory?

Make sure the folder you are uploading to exists and has write permissions.

Upvotes: 1

Related Questions