Uploadify HTTP Error (302) Error

Source: Internet
Author: User

I found that after I update the Flash version, I will report the 302 error when I use uploadify. After studying for half a day, I found that the uploaded action was used to determine whether the user was logged on based on the session. If I did not log on, I jumped to the login page, so I encountered a 302 jump error. After the Flash version is updated, the session value cannot be obtained through uploadify. My current solution is:

1. Upload the action URL to cancel the session acquisition operation. It is very easy to get the session value in advance, and then use the parameter form in the URL to bring it over.

Original code:

JSP end:

$ ("# Imagefile"). uploadify ({
Height: 30,
SWF: '/JS/uploadify/uploadify.swf ',
Uploader: '/upload. Do ',
Width: 120,
Onuploadsuccess: function (file, Data, response ){
VaR datt = new date ();
VaR vdata = eval ('+ Data + ')');
VaR vdatainfo = (datt. getyear () + 1900) + '-' + (datt. getmonth () + 1) + '-' + datt. getdate ();
$ (". Statusinfo ")
. Html (
'Last Update Time: <SPAN class = "graytxt"> '+ vdatainfo +' </span> <a class = "btn_delete imagebuttons" href = "javascript: void (0) "onclick =" javascript: tododel ('+ vdata. rid + ') "> </a> ');
}

});
});

Java:

Beike bksession = (beike) Req. getsession (). getattribute ("bke ");

After modification:

JSP end:

$ ("# Imagefile"). uploadify ({
Height: 30,
SWF: '/JS/uploadify/uploadify.swf ',
Uploader: '/upload. do? Bkeid = '+ $ {bkeid },
Width: 120,
Onuploadsuccess: function (file, Data, response ){
VaR datt = new date ();
VaR vdata = eval ('+ Data + ')');
VaR vdatainfo = (datt. getyear () + 1900) + '-' + (datt. getmonth () + 1) + '-' + datt. getdate ();
$ (". Statusinfo ")
. Html (
'Last Update Time: <SPAN class = "graytxt"> '+ vdatainfo +' </span> <a class = "btn_delete imagebuttons" href = "javascript: void (0) "onclick =" javascript: tododel ('+ vdata. rid + ') "> </a> ');
}

});
});

Java:

String bkeid = request. getparameter ("bkeid ");

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.