Hi!
I did excactly this.
in my ASPx File JavaScript Code I use
$("#UPLOAD_BUTTON").uploadify({
'buttonClass' : "ui-icon ui-icon-plus",
'swf' : '/web/uploader/uploadify.swf',
'uploader' : '/web/uploader/Uploadify.ashx?ASPSESSID=<% =Session.SessionID %>',
'cancelImage' : '/web/uploader/uploadify-cancel.png',
'folder' : '/uploads',
'multi' : true,
'auto' : true,
'checkExisting' : '/web/uploader/Uploadify.ashx?check=true',
'queueID' : "UploadFilesQueue",
'buttonText' : ' ',
'hideButton' : true,
'fileTypeExts' : '*.*',
'fileTypeDesc' : 'Alle Dateien',
'onQueueComplete': function(event,data) {
},
postData : {
"stepID" : $("#lblStepID").text(),
"ASPSESSID" : "<% =Session.SessionID %>",
}
});
you need to pass the SessionID as a parameter and grab it in the Global.asax File or you will create a new ASP.NET session on every Upload.
In the jquery.uploadify.js File you need to find this function and modify it
function onUploadStart(file)
There you can react on the Returncode from you Upload-ASHX file.
I use different return codes for different conditions like
ReturnCode=1 -> File allready Exists
ReturnCode=2 -> File is to Big
....