(ajaxfileupload) Ajaxfileupload The connection reset issue when uploading

Source: Internet
Author: User
Tags connection reset

1.ajaxfileupload upload will have the following problems:

2. There are a lot of solutions online, here, I found a kind of, maybe your mistake will be caused by this reason

------ Reason: You do not have a data format string returned to the foreground in a generic handler

3. An example is given below:

1 Front Desk:2 <styletype= "Text/css">3 . Filelink{position:relative;Display:Inline-block;background:#fff;Border:1px solid #0980D0;Border-radius:4px;padding:2px 8px;Margin-left:10px;Margin-top:10px;Overflow:Hidden;Color:#1E88C7;text-decoration:None;text-indent:0;Line-height:20px;}4 . Filelink input{position:Absolute;font-size:100px; Right:0;Top:0;Opacity:0;}5 . Filelink:hover{background:#AADFFD;Border-color:#78C3F3;cursor:Pointer;Color:#004974;text-decoration:None;}6     </style>7 <spanclass= "FL filelink"style= "padding-left:10px;">Select File<inputtype= "File"ID= "Uploadify"name= "Uploadify"value= "Upload Data" /></span>8 <Scriptsrc=".. /.. /plugins/jquery/jquery-1.7.2.min.js "type= "Text/javascript"></Script>9 <Scriptsrc=".. /.. /plugins/ajaxfileupload.js "type= "Text/javascript"></Script>Ten  One <Script> A        $("#uploadify"). On (" Change", function () { -             //var file = $ ("#uploadify") [0].files[0]; - $.ajaxfileupload ({ the URL:'./importdynamic.ashx', - Fileelementid:'uploadify', - DataType:'text', - Success:function(data, status) { + Alert (1); -                 }, + Error:function () { } A             }); at         }); - </Script> -   - General handlers: - context. Response.ContentType = "Text/plain"; - var filePath = "Uploadfile/xxx.xls"; in FilePath = context. Server.MapPath (FilePath); - Import.getcommonreportfile (filePath); toContext. Response.Write ("Return text data, otherwise the foreground will be reported as above error");

4. Plugin: http://files.cnblogs.com/files/namedL/ajaxfileupload.js

(ajaxfileupload) Ajaxfileupload The connection reset issue when uploading

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.