Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi all just spiking out optimising some already uploaded images where I'd loop through images and run them through tinyfy.com I've hooked this up for the save event for media but wanted to optimise all the legacy/previously uploaded images.
I'm trying to call:
var media = FileSystemProviderManager.Current.GetFileSystemProvider<MediaFileSystem>();
so ultimately I can call something like so:
using (var dataStream = dataResponse.Content.ReadAsStreamAsync().Result)
media.AddFile((string)mediaItem.GetValue("umbracoFile"), dataStream, true);
and getting 'No provider found with the alias 'media'' I have access to the content type service and media service in the same app with no issues and was wondering what I might be missing.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted