This is a migrated thread and some comments may be shown as answers.

Custom AsyncUploadHandler

1 Answer 101 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Pete
Top achievements
Rank 1
Pete asked on 21 Sep 2010, 11:10 PM
Hi,
I'm using the AsyncUpload control in an MVC.NET project, and want to change the TempTargetFolder (dynamically) in the IAsyncUploadResult method. However, I don't have access to Session variables for the current context. (Either accessed via Session. or context parameter)
Here's an example of my code:

protected override IAsyncUploadResult Process(UploadedFile file, HttpContext context, IAsyncUploadConfiguration configuration, string tempFileName)
{
  // This will throw an exception even when I've set it in the controller
  configuration.TempTargetFolder = context.Session["MySessionVar"].ToString();
  return base.Process(file, context, configuration, fileName);
}

Any suggestions?
Thanks!
Pete

1 Answer, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 24 Sep 2010, 03:37 PM
Hi Pete,

The Session in MVC is obtained the same way as in ASP.NET. We are not sure what exactly is going wrong on your side. Please, open a support ticket and send us a sample runnable project that reproduces the fault so that we can take a look at it.

Regards,
Genady Sergeev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
AsyncUpload
Asked by
Pete
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Share this question
or