var ms = ApplicationContext.Current.Services.MediaService;
var mediaMapFolder = ms.CreateMedia("TTImages", -1, "Folder");
ms.Save(mediaMapFolder);
This is successful in creating a folder node in node Umbraco/BackOffice/Media. But it does not create a new folder on disk as I expected at "/media/TTImages/".
Please let me know if you can help explain what is happening or help me resolve this issue.
As far as I know.
You are creating a media "TTImages with" the media type "Folder".
Folder media type is for the back office. And Umbraco should not create a folder on the disk. It only exist on the umbraco back office.
Problem using MediaService to create a Folder
Hi Umbraco Folk,
Based on code from https://our.umbraco.org/Documentation/Reference/Management/Services/MediaService I wrote the following lines of code:
This is successful in creating a folder node in node Umbraco/BackOffice/Media. But it does not create a new folder on disk as I expected at "/media/TTImages/".
Please let me know if you can help explain what is happening or help me resolve this issue.
Thanks very much,
Terry Clancy ClanceZ
As far as I know. You are creating a media "TTImages with" the media type "Folder". Folder media type is for the back office. And Umbraco should not create a folder on the disk. It only exist on the umbraco back office.
jivan wirtes true, you can't create folder on the disk in the media folder
is working on a reply...