开发者

Uploadify upload doesn't start - forbidden location?

i'm currently trying to implement "UPLOADIFY" to a wordpress template page. I implemented it well, because almost everything is working now, except the Upload doesn't start, but the reason therefore is propably not wordpress.

It's propably the folder I set where i want to upload the files to. The folder lies in my root of the page and normally i'm connecting to it with an ftp client. If i call the folder in my browser with http://www.mywebsite.com/fileupload the browser tells me forbidden.

However, that's not the only folder which is not working. it doesn't actually matter which folder i'm creating and what permissions i give it, the upload will not start.

<script type开发者_Python百科="text/javascript">
$(document).ready(function() {
    jQuery('#fileselect').uploadify({
        'uploader': '<?php bloginfo('template_url'); ?>/uploadify/uploadify.swf',
        'script': '<?php bloginfo('template_url'); ?>/uploadify/uploadify.php',
        'folder': 'http://www.mydomain.com/test', //or just /test
        'multi' : 'true',
        'cancelImg': '<?php bloginfo('template_url'); ?>/uploadify/cancel.png'
    });
}); 
</script>

i tried creating a new directory in my root of my website called "test" and i gave it all permissions 777. However the upload will not start.

do you guys have an idea, what i could do wrong? is there a debug mode or so?

please guys help me, i would love to make uploadify working.


in your $(document).ready function you need to add

'auto': true,

Also I would recommend removing the quote from multi since it is a boolean not a string

<script type="text/javascript">
$(document).ready(function() {
    jQuery('#fileselect').uploadify({
        'uploader': '<?php bloginfo('template_url'); ?>/uploadify/uploadify.swf',
        'script': '<?php bloginfo('template_url'); ?>/uploadify/uploadify.php',
        'folder': 'http://www.mydomain.com/test', //or just /test
        'multi' : true,
        'auto'  : true,
        'cancelImg': '<?php bloginfo('template_url'); ?>/uploadify/cancel.png'
    });
}); 
</script>


I don't know about this addon, but it seems wrong for me that you set the upload folder in the client side, for obvious security reasons.

I'm sure the plugin have some settings on server side, like an array of available accepted upload locations. Besides, if accessing a folder from your browser says forbidden, it's probably due to that server configuration prevent directory listing, and it doesn't mean it's forbidden for the script to write/upload/create files in it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜