Use of Default Media Folder Path

Topics: Customizing Orchard, General, Writing modules
Aug 11, 2012 at 8:20 PM

Before I go hacking blindly, what was the logic of putting all media folders created in a "Default" subfolder? Multi-tenancy?

Aug 14, 2012 at 3:56 AM
Edited Aug 20, 2012 at 4:33 PM

Seeing as how the Media path is set in the core framework, to create a module to make this change, I've got to use the OrchardSuppressDependeny attribute on my class to override the FileSystemStorageProvider yes? Better yet, are there any modules one might recommend I use as a reference for my tinkering which override core providers?

Aug 20, 2012 at 4:34 PM
Edited Aug 20, 2012 at 4:36 PM


Aug 24, 2012 at 11:04 PM

I know the Advanced Menu module uses some SuppressOrchardDependency attributes you may want to have a look at.

Aug 28, 2012 at 4:05 PM

Thanks! I don't know why I didn't think to look at Piotr's menu module.

Aug 28, 2012 at 4:33 PM

To the original question: yes, and if you have more tenants, the Media folder will have multiple folders corresponding to tenants. IStorageProvider (at least the default implementation) is also tenant-aware, meaning every path used with it is relative to the tenant's media folder.