Set Upload Path

Aug 29, 2011 at 7: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 5:17 PM

Hello,

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.