The ability to upload files is implemented in recent projects using Uplaodify. In the transmission of dynamic parameters, encountered a problem!
Using the settings method provided on the website
Official examples
function Changebtntext () {
$ (' #file_upload '). Uploadify (' Settings ', ' ButtonText ', ' BROWSE ');
}
The first parameter must be ' settings '
The second parameter cannot be set casually. (I was in this place, took some time)
The third parameter is a value.
I arbitrarily set a string in the second argument, but request["parameter name" gets the value. Later, looked at the jquery.uploadify.js, only to find that
The value of the second parameter is specific to a few. If the parameter is passed, the formData is used;
The third parameter passes a JSON-formatted data. If {"name": "MyName"}
The server (written in C #) Gets the value when request["name" is available.
Fileobjname This property, using request["attribute value" is not worth it. Use request.files[the value of the Fileobjname property to fetch the value.
Note: When I write this, it seems to be a bit clear, why the second parameter is a specific value, the settings method is to set the property, the second parameter is the name of the property in Uploadify.
Uploadify the properties provided by the official website. http://www.uploadify.com/documentation/
- Auto
- Buttonclass
- Buttoncursor
- Buttonimage
- ButtonText
- Checkexisting
- Debug
- Fileobjname
- Filesizelimit
- Filetypedesc
- Filetypeexts
- FormData
- Height
- ItemTemplate
- Method
- Multi
- Overrideevents
- Preventcaching
- Progressdata
- Queueid
- Queuesizelimit
- removecompleted
- Removetimeout
- Requeueerrors
- Successtimeout
- Swf
- Uploader
- Uploadlimit
- Width
jquery.uploadify Dynamic Transfer Parameters