RickStrahl / Westwind.plUploadHandler

An ASP.NET base HttpHandler library to handle plUpload content on the server.
28 stars 19 forks source link

OnUploadComplete - additional parameter #5

Open jfrueh opened 10 years ago

jfrueh commented 10 years ago

Hi Rick - love this project. It's really turned out to be useful for us, so thanks for providing it. This is not an issue - just a question. I'm needing to have a few additional parameters available to me other than just the filename when the OnUploadComplete(string fileName) method is called on the server side. Would you know how to do this?

Thanks,

RickStrahl commented 10 years ago

What else do you want to get? There's no other data available since the last request will only hold the file chunk that's being transmitted.

jfrueh commented 10 years ago

I was hoping that on upload complete (successful) I could trigger some custom server side processes. What I want to execute requires a user id to be passed as well. I know this id when I make the POST call to the server, but wasn't sure how to pass it along.

I appreciate the response. Thanks,

-J

On Fri, Mar 7, 2014 at 4:18 PM, Rick Strahl notifications@github.comwrote:

What else do you want to get? There's no other data available since the last request will only hold the file chunk that's being transmitted.

Reply to this email directly or view it on GitHubhttps://github.com/RickStrahl/Westwind.plUploadHandler/issues/5#issuecomment-37074059 .

agrath commented 10 years ago

How I've just implemented this, because I need my files uploaded to be associated back to a primary record, is I return the filename in the upload complete, store this in a hidden field, and then when the main form is posted, I have a reference to the file. I agree a "passthrough" would be useful as I've needed this with plupload before. I believe you can add additional multipart parameters via the native plupload API and then they should be in the httpcontext request object for you to grab. http://www.bennadel.com/blog/2506-storing-per-file-multipart-params-in-the-plupload-queue.htm