Don't miss out Virtual Happy Hour this Friday (April 26).
Try our conversational search powered by Generative AI!
AI OnAI Off
Don't miss out Virtual Happy Hour this Friday (April 26).
string localPath = file.LocalPath;
..will get you the same value so there is no reason to use IFastFileDownload anymore. Be aware that a unified file implementation that does not provive a local path may return a Null value here (the same way a provider was not required to return a IFastFileDownload).
EPiServer CMS 4.61: string path = "/demo/myfolder/mytext.txt"; UnifiedFile file = UnifiedFileSystem.GetFile(path); IFastFileDownload filedownload = (IFastFileDownload)file.Provider; EPiServer CMS 5.1: string path = "/demo/myfolder/mytext.txt"; UnifiedFile file = HostingEnvironment.VirtualPathProvider.GetFile(path) as UnifiedFile; IFastFileDownload picdownload = (IFastFileDownload) file.Provider;