0

I would like to add a new item to the file picker, but I do not know what to do.
I always see a directory portal\0\ How can I change or add path in filepickeruploader ?

<dnn:filepicker id="filepicker1" runat="server"></dnn:filepicker>
DnnFilePickerUploader filepicker = (DotNetNuke.Web.UI.WebControls.DnnFilePickerUploader)Panel1.FindControl("filepicker1");
Hossein Rahmati
  • 205
  • 1
  • 2
  • 11

2 Answers2

0

You can change the path by using the FilePath property.

For example, if you wanted to set the default folder to be "Images/", try this:

<dnn:FilePicker id="filepicker1" runat="server" FilePath="Images/"></dnn:FilePicker>
Scott McCulloch
  • 465
  • 3
  • 6
0

Use the DotNetNuke.Services.FileSystem namespace. To add a new folder would be:

FolderManager.Instance.AddFolder(PortalId, myPath);
Chris Searles
  • 2,322
  • 17
  • 32