Search code examples
jqueryasp.net-mvc-3uploadify

Uploading files with Uploadify with extended data


I've been googling this for hours but can't find what I'm after. I do apologise I'm new to JQuery so maybe I'm missing something obvious. Anyway I want to be able to pass some information along with my file when uploading.

For example, a user uploads a video file I want them to be able to select the file and then have to enter a description for the video before uploading can begin. Once they have done this and click upload they will be shown the standard uploadify progress then once finished the postback to the server will happen as normal at which point I will write some info about the uploaded file to my db including the description they entered.

Is this possible? I'm will to work on it I just need a bit of a shove in the right direction!

Cheers


Solution

  • You can pass the additional data in the scriptData parameter.
    Before calling uploadifyUpload(), call uploadifySettings to set scriptData to contain the description.