About the file upload plugin plupload get server-side return value issues

Source: Internet
Author: User
I use plipload this plugin to upload files, each time the file can be uploaded successfully, but there is no way to get the data returned by the server, it has provided an instance, but I have been tested to find that the return code does not work, because anyway it will show all success.

I Google a long time online some people say can not find the callback function, this is easy to find to see the source on the line, but in the callback function also can not print out my server side of the data returned, here is my callback function:


Is anyone using this? Some words please help AH, greatly appreciated!!


Reply to discussion (solution)

It's "plupload" on the wrong ....

I also met the same problem, how to solve ah?

How to write the callback function???

Did you solve it? What is the callback function up?

I write to the database, then go to the database read

Look at the source code, there is a way to get response:
Up.trigger (' fileuploaded ', file, {
Response:xhr.responseText,
Status:xhr.status,
ResponseHeaders:xhr.getAllResponseHeaders ()
});
So you can use the ' fileuploaded ' method in the foreground to get the response information after uploading, corresponding in your background code to return the relevant response information, such as:
Init: {
Fileuploaded:function (Up,file,result) {
alert (result.response);
}
}
That's all you can do.

  • Related Article

    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.