Hello,
Can you give me an example how to send additional variables to the save handler with the upload widget. I found the "upload" event, and the data object in it, but it is still not clear to me.
The additional data object simply expects a list of key/value pairs that will be passed on in the post request as variables. For example:
functiononUpload(e) {
e.data = {StringVar1: 'This is my value', ItemId: 56, Action: 'add'}
}
These should then be available in the request object. I'm grabbing them with the following line of code in an ashx file.
context.Request.Form("Action")
Although you could get it via the following as well: context.request("Action"). I'm not sure exactly about the php syntax, but I'm sure you can figure it out if needed.
I just discovered kendoui and the library is very promising. Thank you for your effort.
I have been trying to figure out this myself for the past half hour until I found the forum. Documentation for upload event handler is written in a way that makes me think that the callback expects 2 parameters, files and data. I recommend you fix the documentation to match the information in this thread, hopefully with the example.
Using php, $_POST['StringVar1'] can be used to read the first item in the example.
0
T. Tsonev
Telerik team
answered on 06 Dec 2011, 06:05 PM
Hi Ege,
Thank you for your feedback. We've updated the Upload documentation and the events section in particular.
Regards,
Tsvetomir Tsonev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!