Set Upload Path

Aug 29, 2011 at 8:26 PM

Is there an easy way to set the upload path? In my case depending on which user is logged into my system i need to upload files into a different location. I cant see any exposed property that can have this assigned to it

Oct 4, 2011 at 6:17 PM


I don't know if this'll help you but I found that you can pass value to the uploader with the HTTPContext.


 private HttpContext ctx;
        public void ProcessRequest(HttpContext context)
            ctx = context;
            string val = context.Request["val"].ToString();
            string uploadPath = val;
            FileUploadProcess fileUpload = new FileUploadProcess();
            fileUpload.FileUploadCompleted += new FileUploadCompletedEvent(fileUpload_FileUploadCompleted);
            fileUpload.ProcessRequest(context, uploadPath);
And using the example you can update the UploadPage Property to your ashx page with the request value.