Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Deleting container folder to a blob programmatically

Vote:
 

Hi all!

I'm working with blobs programmatically in my current Episerver project (version 7.7). I have a problem though. At a certain point, I need to delete a blob and it's container folder from disk. The blob itself gets deleted without a problem, but the container folder doesn't, so I end up with a bunch of empty folders whenever the scheduled job that contains the logic runs.

I've tried:

BlobFactory.Instance.Delete(Blob.GetContainerIdentifier(fileContentType.ContentGuid));

and:

BlobFactory.Instance.Delete(fileContentType.BinaryDataContainer);

 but I always get the same result. 

Any ideas? Thanks

#176339
Mar 16, 2017 11:22
* 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.