Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Tom 713 posts 954 karma points
    Oct 19, 2017 @ 03:37

    UmbracoFileSystemProviders.Azure - Server.MapPath

    Hi we're using azure blob storage but have a need to pull the file from disk to stamp it in to a PDF. Just wondering how to obtain a disk path for a given media file?

  • Kevin Jump 2115 posts 13361 karma points MVP 5x c-trib
    Oct 19, 2017 @ 08:47
    Kevin Jump


    the best thing to do is to use the IFileSystem interface to access the media folder. this abstracts away the storage system underneath.


    you get the media folder with :

    IFileSystem fileSystem = FileSystemProviderManager.Current.GetUnderlyingFileSystemProvider("media");

    and one you have that you can do most of the same things you can with System.IO. except it will happen wherever your media is stored.

  • Tom 713 posts 954 karma points
    Oct 19, 2017 @ 21:59

    Thanks Kevin!

Please Sign in or register to post replies

Write your reply to: