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

Set TargetFolder

3 Answers 66 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 23 Aug 2011, 12:54 PM
Is it possible to set the TargetFolder property in the UploadHandler on the server side?

Thanks,
Paul.

3 Answers, 1 is accepted

Sort by
0
Alex Fidanov
Telerik team
answered on 25 Aug 2011, 04:44 PM
Hi Paul,

Yes, this is possible. The RadUploadHandler has virtual properties TargetFolder and TargetPhysicalFolder which you can override and set on the server side.

Best wishes,
Alex Fidanov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Paul
Top achievements
Rank 1
answered on 26 Aug 2011, 10:52 AM
Where exactly can I set TargetFolder on the server side? I have had to override the GetTargetFolder method and set my folder here, however this seems to be called every time a chunk of data is posted, I want to set the target folder only once i.e. when the first chunk of data is transferred.

Thanks,
Paul.
0
Petar Mladenov
Telerik team
answered on 31 Aug 2011, 03:01 PM
Hello Paul,

 You just have to override the TargetFolder (or TargetPhysicalFolder) in the UploadHandler class in your web project like so:

namespace UploadHandler.Web
{
    /// <summary>
    /// Summary description for UploadHandler
    /// </summary>
    public class UploadHandler : RadUploadHandler
    {
 
        public override string TargetFolder
        {
            get
            {
                return base.TargetFolder;
            }
            set
            {
                base.TargetFolder = value;
            }
        }
 
        
    }
}
Then you can change the setter and getter as you want. Let us know if you need further assistance.

All the best, Petar Mladenov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Upload
Asked by
Paul
Top achievements
Rank 1
Answers by
Alex Fidanov
Telerik team
Paul
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or