Topic: Returning data from upload.php?

I have a fairly straightforward need.  I am trying to modify the upload.php script to do some business logic and return information about the file to javascript for display to the user.

It looks like JSON-RPC is used?  Does anyone know how I can return my own custom information...and how I access it in javascript @ the "FileUploaded" event?


Re: Returning data from upload.php?

AFAIK you can return anything you want from the server.  Then write your own code in JavaScript to look at the returned data and do whatever you want with it. 

It is in your hands, plupload does nothing other than passing the response from the server back via a callback you register against the FileUploaded event.

Re: Returning data from upload.php?

This topic gets discussed a fair bit on the forum.  This thread may also be helpful:

Re: Returning data from upload.php?

Perfect... thank you for the quick response.

In sort in case anyone else looks for this same information:

uploader.bind('FileUploaded', function(up, file, info) {

Does the trick!

Re: Returning data from upload.php?

I don’t know what to say. This site is fantastic. That’s not really a really huge statement, but it’s all I could come up with after reading this. You know so much about this subject. So much so that you made me want to learn more about it. Your post is my stepping stone, my friend. Thanks for the heads up on this subject.
So, I am really impressed to you.....and thanks for searing this post....and thanks again for write this post......


6 (edited by morgan16 2011-12-09 14:32:38)

Re: Returning data from upload.php?

Felling so tremendous after including myself with such kind of informative post.
Marvelous attempt.

Goodluck!!! everyone:)