jquery.uploadify Dynamic Transfer Parameters

Source: Internet
Author: User

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

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.