I use uploadify to upload files into my web site.
It works with one hosting company. And doesn't with other company (sweb.ru).
Error is: HTTP error: 302.
Does Anybody know how to resolve this problem. Thanks.
You can follow these five steps to fix HTTP 302 errors on your website: Determine whether the redirects are appropriate or not by examining the URLs that are issuing the 302 redirects. Check your plugins to make sure any redirect settings are valid. Ensure that your WordPress URL settings are configured correctly.
The HyperText Transfer Protocol (HTTP) 302 Found redirect status response code indicates that the resource requested has been temporarily moved to the URL given by the Location header.
What is an HTTP 302? The 302 status code is a redirection message that occurs when a resource or page you're attempting to load has been temporarily moved to a different location.
For anyone having this problem with Uploadify and a PHP Framework (e.g., CodeIgniter, CakePHP, Kohana, Yii, etc.):
Flash will not pass through your existing PHP Session information, so if you are getting the 302 error it is likely that your application is returning the login URL to the Flash player. To resolve this issue, you could include the session information in scriptData and manage it manually in your application.
Problem was solved by adding "SecFilterEngine Off" in htaccess
Remember that you may have to stop the redirect. I'm using cakephp. To stop the auth from triggering when the uploadify / ajax method is called you have to add the following to the controller.
public function beforeFilter()
{
parent::beforeFilter();
$this->Auth->allowedActions = array('admin_attach');
}
"admin_attach" is the method that is called by uploadify in my view.
$(document).ready(function() {
$('.image-attach').uploadify({
'uploader' : '/uploadify/uploadify.swf',
'script' : '/admin/featureds/featured_resources/attach/',
'cancelImg' : '/uploadify/cancel.png',
'buttonText' : 'Select image',
'fileDataName' : 'uploadify',
'auto' : true,
onComplete : function(event, id, fileObj, resp, data){
alert(resp);
}
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With