JavaScript uploadify or swfupload upload problem

Source: Internet
Author: User

1, uploadify or swfupload in Chrome, Firefox browser under the session can not find the problem

The problem is as follows: for security purposes, program development often through the session set permissions control, only the user can upload the login. Under IE no problem, but in Firefox and other non-IE kernel browser, run an error "Http error 302".

After searching to know: Because uploadify or swfupload is uploaded by Flash.

(1) Because Flash does not contain cookie information when executing the POST request, the server session will be SessionID based on the client's cookie. It is not possible to get to the session without submitting a cookie, and then Uploadify returns a 302 (Request redirected) error.

(2) Flash in IE will be the current page of the cookie sent to Upload.ashx, but Chrome, Firefox will not be the current page of the cookie sent to Upload.ashx. because the session is implemented by the SessionID saved in the cookie , This is because the current page cookie is not passed to the flash request Upload.ashx, so the requested file is sent to Upload.ashx is a new session, of course, this session is not logged in.

Solution: that is to manually pass the SessionID to the server, and then the server read out SessionID and then load the session.

JavaScript uploadify or swfupload upload problem

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.