Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
205
Sending parameters with fileUpload
posted

Im having a bit of a problem when two or more users are uploading files at the same time. The uploads seems to be mixed up on the server.

Im trying to do this by reading the UrlReferer for each incoming request.

internal static void HandlerUploadFinising(object sender, UploadFinishingEventArgs args) {

   var uploadId = Convert.ToInt32(System.Web.HttpContext.Current.Request.UrlReferrer.Segments.Last());

}

internal static void HandlerUploadFinished(object sender, UploadFinishingEventArgs args) {

   var uploadId = Convert.ToInt32(System.Web.HttpContext.Current.Request.UrlReferrer.Segments.Last());

}

This does not work when two users are uploading at the same time.

Is there any way of sending parameters to the server for each upload. I need to send a unique user id from the the client to the server to ensure that the upload is saved to the correct user.