Had some trouble loading a vitrual file containing spaces.
The problem was apperently that some characters were urlencoded, a simple Server.UrlDecode(CurrentPage["DocumentPath"]) solved the problem.
A blog about understanding and extending EPiServer
You are currently browsing articles tagged virtual file.
Had some trouble loading a vitrual file containing spaces.
The problem was apperently that some characters were urlencoded, a simple Server.UrlDecode(CurrentPage["DocumentPath"]) solved the problem.
Tags: urldecode, urlencode, virtual file
VirtualFile file = System.Web.Hosting.HostingEnvironment.VirtualPathProvider.GetFile( CurrentPage["FilePath"].ToString() );
UnifiedFile f = file as UnifiedFile;
return f.Length / 1024 + " kb";
Tags: cms, EPiServer CMS 5, filesize, virtual file
Recent Comments