November Happy Hour will be moved to Thursday December 5th.

Access to Content Asset Folder to remove/edit files

Vote:
 

Hi,

This is in reference to a query on Content Asset folder physical location.

For instance, the below Url is part of content asset folder.

https://loca.xyz.com/contentassets/187fe4d8e9534340b485da129a67c44c/cyber_infographic.jpg

Is there any way to get to the physical path in episerver to either remove/edit the file.

Any help will be appreciated.

Regards.

#248780
Feb 17, 2021 13:34
Vote:
 

If you go to the appData folder - as defined in EpiserverFramework.config, and look for 187fe4d8e9534340b485da129a67c44c, you would find the folder 

#248781
Feb 17, 2021 14:00
Farhin - Feb 17, 2021 19:42
Thanks for your input that i was able to track the physical path of the images.
Although,I have a question following this.The Images for my application are stored in Azure Blob containers.Is there a way to get the complete URL as below:
https://abcInte.blob.core.windows.net/asset/5a5cdad1f07f41a1a601ab2a5989a5d7/59fdc7109aa94d00a4edd1fbaea8002c.jpg

I came across a similar post with your answer on the below link,
https://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2019/11/how-to-get-blob-url/

So ,my question is ,Is Episerver Commerce required for such situation coz i couldnt find CommerceMediaCollection anywhere in the content class?
Any alternative to getting the complete blob url?

Thanks in advance.
Vote:
 

as long as you have the content link of the media, or if you have the virtual url, then you can use UrlResolver.Route to get the content. Still from https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2015/4/get-blobs-raw-url-on-disk/

var media = UrlResolver.Current.Route(new UrlBuilder(Image)) as MediaData;

if (media != null)
{
    var fileBlob = media.BinaryData as FileBlob;

    if (fileBlob != null)
    {
        var path = fileBlob.FilePath;
    }
}
#248820
Feb 18, 2021 9:20
Farhin - Feb 19, 2021 14:14
Thanks again for the input that was useful.However the output that i was able to get was epi.fx.blob://default/e5cbe831606546469adb38c6ff7ef4c3/9cbcdf68d54f407293b22eb1a788e72d.jpg
rather than
https://abcInte.blob.core.windows.net/asset/e5cbe831606546469adb38c6ff7ef4c3/9cbcdf68d54f407293b22eb1a788e72d.jpg
I tried digging the issue more through quick watch & was able to get the actual url through,
((EPiServer.Azure.Blobs.AzureBlob)fileBlob)._azureBlob.Uri.OriginalString but they are non public members.
Do i need to establish a connection to azure blob & use methods under azure blob or any other way.
I am new to this area & so please excuse if the above doesn't make sense.
The purpose of the above is to get all the Images within episerver Media for some remediation activity for all the sites within episerver.I am able to get the image list.The only issue is to get to the location of content asset folder which i was able to with your first suggestion.Now,its only the link on the azure site that i need to get to create a report for the same.
Regards.

Vote:
 

Finally i was able to get to the path to contentassets in case anyone is facing the similar issue. Navigating to

/EPiServer/CMS/admin/ManageContent.aspx?id=10574

where 10574 is the content Id

Here is the episerver forum post that was helpful:

https://world.episerver.com/forum/developer-forum/CMS/Thread-Container/2019/2/how-to-delete-unreferenced-content-from-the-ui/

Regards.

#257122
Jun 25, 2021 13:28
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.