SaaS CMS has officially launched! Learn more now.

Getting the physical path of files in FileManager



I have 300+ images uploaded in FileManager.

Now I need to get the physical path representation of those images in my code-behind.

How would I do it? The structure of the VPP folder is not the same as the folder structure in FileManager




Jun 17, 2011 1:36

Maybe not much help, but check out the sdk at There you will find a developer's guide which talks about the file system. 

But basically you get the file like this:


And the physical structure is because you are using the versioning provider. It stores the files as guids and uses the guids three first pairs for folder structure. So the file 77E21AEE-9895-11E0-9B8A-206F4824019B.jpg will be stored in the folder stucture: 77/E2/21/. Hope that makes sense, otherwise I do believe that the sdk talks about this. 

Jun 17, 2011 5:55

you can get it as follows

UnifiedFile uf = HostingEnvironment.VirtualPathProvider.GetFile(virtualPath) as UnifiedFile;
string localPhotoPath = uf.LocalPath;


make sure you import

using EPiServer.Web.Hosting;


Edited, Jun 17, 2011 20:43
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.