Пример #1
0
 private bool DoProcessRequest(HttpContext context, Sitecore.Resources.Media.Media media)
 {
     var helper = new MediaHelper(media.MediaData.MediaItem);
     string redirectUrl = helper.GetCloudBasedMediaUrl();
     context.Response.Redirect(redirectUrl, false);
     context.ApplicationInstance.CompleteRequest();
     return true;
 }
Пример #2
0
        public void Process(GetMediaStreamPipelineArgs args)
        {
            if (!ShouldProcess(args))
                return;

            var helper = new MediaHelper(args.MediaData.MediaItem);
            MediaStream thumbnailStream = helper.GetThumbnailStream();

            if (thumbnailStream != null)
            {
                args.OutputStream = thumbnailStream;
                args.AbortPipeline();
            }
        }