Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

Closed Feature: Feature Request: Extend IMediaFile to support URL based media [1951]

$
0
0
I am in the middle of implementing an alternative IWritableDataProvider that goes against Amazon's S3. I have all the CRUD operations working for files and folders.

The problem I now have is that there is a function in MediaFileProviderElementProvider.cs:

```
internal static string GetMediaUrl(IMediaFile file, bool isInternal, bool downloadable)
{
return MediaUrlHelper.GetUrl(file, isInternal, downloadable);
}
```
... that gets the URL for the media file - in all my use cases, images. The whole point of my effort is to include URLs for images that point directly to Amazon.

I want to add a new public property to IMediaFile that has the URL to the media item. Then we can modify the function above to check to see if the file has a preferred URL. If not, fallback and use the existing behavior.

The obvious problem is that it breaks any existing implementations of the IMediaFile interface.

Thoughts? I want to minimize modifications on the core Composite.dll if possible and push the responsibilities out to my DLL so it's easy to add/remove from the project.
Comments: Implemented

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>