Copied to clipboard

Flag this post as spam?

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


  • Yetiish 6 posts 91 karma points
    Apr 15, 2020 @ 12:50
    Yetiish
    0

    v8 UmbracoForms PhysicalFileSystem

    In v7 we had FileSystemProvider configured to store our UmbracoForms data (json files etc) in a centralised directory.

    I have set the media file using a composer

    composition.SetMediaFileSystem(() => new PhysicalFileSystem("~/media/"));
    

    How do we do an equivalent for the forms file system in v8? It would be good to see this documentation updated. https://our.umbraco.com/Documentation/Add-ons/UmbracoForms/Developer/IFileSystem/

    Thanks

  • Yetiish 6 posts 91 karma points
    Apr 16, 2020 @ 15:17
    Yetiish
    100

    Solved.

    using Umbraco.Core.Composing;
    using Umbraco.Core.IO;
    using Umbraco.Forms.Data.FileSystem;
    
    namespace MyNamespace
    {
        public class SetUmbracoFormsFileSystemComposer : IUserComposer
        {
            public void Compose(Composition composition)
            {
                composition.RegisterUniqueFor<IFileSystem, FormsFileSystemForSavedData>(new PhysicalFileSystem("~/media/UmbracoForms/"));
            }
        }
    }
    

    Hopefully someone can update the Documentation soon so this is a bit easier to find.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies