Copied to clipboard

Flag this post as spam?

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


  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    Nov 20, 2019 @ 18:08
    Nik
    0

    Custom File Provider - Azure Blob Storage (Not Media)

    Hi All,

    I'm hoping for some help, mainly in understanding what I need to do to achieve this, and how Virtual File Providers work in Umbraco as I'm just not grasping it.

    Requirement:

    In azure blob storage I have a container called "Downloads", in this container is 1000 - 2000 blob items. When these files are uploaded to the container I receive events which I handle (or need to finish handling).

    I want to be able to serve these files seamlessly via my site e.g. my.domain/documents/blob.name

    I also want to be able to access these files via a file provider so I can index their contents using the IOHelper/VirtualPathProvider

    So the question

    1. Should I be going down the VirtualFileProvider approach in the same way that the UmbracoFileSystemProviders.Azure package does?
    2. If so, how do I approach this as the code in the UmbracoFileSystemProviders.Azure seems very targeted at Media when it comes the provider.
    3. What am I missing in my understanding of a VirtualFileProvider and it's usecase if I shouldn't be doing the above?

    My understanding is that this should make accessing the physical files easier than having to use the Blob Storage API as it's all wrapped in that.

    Hopefully this makes sense and what I'm asking is clear.

    Any help would be greatly appreciated :-)

    Nik

  • jake williamson 207 posts 872 karma points
    Mar 24, 2021 @ 02:57
    jake williamson
    0

    hi nik,

    we've been trying to come up with a solution to the exact same requirement for a new site we're working on!

    did you have any joy with solving the problem? our thought process and questions we're pretty much the same as yours i.e. should we explore the set up in UmbracoFileSystemProviders.Azure and use it as a starting point.

    however the code UmbracoFileSystemProviders.Azure does seem to be very media or forms focused...

    if you did manage to come up with a solution, it'd be great to hear how you went ;)

    cheers,

    jake

  • Mehmet Avcı 55 posts 240 karma points
    Mar 25, 2021 @ 11:04
    Mehmet Avcı
    0

    Hi,

    I had a similar case, where I need to use some other blob container. Since UmbracoFileSystemProviders.Azure package is basicly azure blob storage bridge for media files, indeed it is really focused on those - in fact, in umbraco 7 if you change /media prefix you usually end up with quite an headache.

    So I took regular storage access approach and adapted it for package. Solved connection issue with opening up a new connection with AzureBlobFileSystem class in UmbracoFileSystemProviders.Azure package.

    I also tapped into content CRUD events in order to track down property type I had is ever updated and any operation was required in blob itself.

    It is not an automated process, but I believe you can devise a way to help yourself here on.

Please Sign in or register to post replies

Write your reply to:

Draft