Uploadify solution for losing session problem under Firefox _javascript skills

Source: Internet
Author: User
Today in the use of Uploadify upload plugin encountered a problem, because I have done a privilege management, each request has to read the session to judge the permissions, but the plugin found after the login can not upload, because in the reading session when I think there is no authority to be intercepted, Later in the background print log in the ID of the session and read the session ID, it is not the same, in the online search, there are really a lot of people encounter this problem, the solution is posted:

First talk about my environment, backstage is using the jsp,uploadify version is 3.2

Configuration in JSP page:
Copy Code code as follows:

<script type= "Text/javascript" >
$ (document). Ready (function () {
$ ("#fileupload"). Uploadify ({
' swf ': '/uploadify/scripts/uploadify.swf ',
' Uploader ': '/fileupload;jsessionid=${pagecontext.session.id} ',
' Auto ': true,
' Multi ': false,
' ButtonText ': ' BROWSE ',
' Filedesc ': ' Support format: jpg/gif/jpeg/png/bmp. ',
' Fileext ': ' *.jpg;*.gif;*.jpeg;*.png;*.bmp ',
' Onuploadsuccess ': onuploadsuccess
});
});
</script>

The key is the red word that part, to note that the front of the jsessionid is a semicolon rather than a question mark, written as a question mark as a parameter passed, hoping to help everyone less detours

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.