Questions tagged [media-library]

Anything related to media stored in the database or file system and created as items in the Media Library.

Filter by
Sorted by
Tagged with
11
votes
4answers
10k views

MediaRequestProtection: An invalid/missing hash value was encountered

My Sitecore error logs contain messages such as: ERROR MediaRequestProtection: An invalid/missing hash value was encountered. The expected hash value... What would be causing this? This is only ...
8
votes
4answers
2k views

Change default file name when downloading from Media Library

I store user uploaded files in Media Library, which can later be downloaded by admins. When saving files, I change the file names to guarantee uniqueness, but later when admins download them I want ...
3
votes
2answers
2k views

How to change the source from an image field programmatically?

I am trying to find a way to change the source from an image field when an user clicks the "Choose an image" button (webedit:chooseimage command) from Experience Editor, and points to ...
9
votes
4answers
4k views

Forcing Sitecore to clear the cache for updated images

I am aware there are a number of Cache settings for media library items in Sitecore (as described here: Sitecore Implementation - HTML Cache Control Setting options). However the MediaResponse....
1
vote
1answer
2k views

Override Media Manager to Change Url

I need to insert text for a media item when getting a media type of PDF by changing the GetMediaUrl method. This is for an RTE field. I went to override the MediaProvider, but found it was obsolete ...
13
votes
4answers
20k views

How do you get the link for a media item?

I have an item in the media library in Sitecore and I want to place a link to that item on the site. How do I properly get the link for that media item?
4
votes
1answer
900 views

Will Sitecore support Jpeg 2000 , Jpeg XR, webp image format by default?

We have recommendation from our seo team to use image format like jpeg 2000, jpeg XR, webp but when we try to upload Jpeg 2000 image with extension .jp2, sitecore not taking as image format instead it ...
1
vote
1answer
587 views

How to force download media based on business logic?

In our solution we have some particular cases where we want to provide a "download media" link instead of a straightforward media link. We don't want to force download for any particular file types, ...
1
vote
3answers
1k views

Media Item upload upload size validation - confirm dialog issue

I am trying to validate media item whilst uploading to check if the media of certain type has a specific size limit. Created a pipeline which replaces the Sitecore.Pipelines.Upload.CheckSize to the ...
0
votes
4answers
4k views

Inserting SVG files/markup

There seems to be an issue with SVG markup that works fine when embedded manually (through a rich text field for example) vs. when I save that same code as an .svg file, add it to the media library, ...
5
votes
1answer
600 views

SXA what is the purpose of the Media folder under a Site

What is the purpose of the Media folder under a site in SXA? Technically this seems to behave the same way as the regular media library, but I'm just not sure why you would use this, or if there are ...
7
votes
2answers
1k views

Convert disk based media to database

What's the best approach to migrate disk-based media into the database? We inherited a large enterprise site that's getting forklifted to Sitecore 8.2, and it currently uses file-based media. We want ...
6
votes
2answers
2k views

How to index PDF content in Sitecore running on Azure Web App?

I am trying to index media content (such as PDFs) using Azure and to my surprise/frustration, this feature isn't supported: https://kb.sitecore.net/articles/830385 Is there a workaround that allows ...
5
votes
1answer
840 views

MediaLinkServerUrl per site

Is there a way to set Media.MediaLinkServerUrl value per sitecore site? basically I would like to use CDN for main website by specifying the cdn domain as MediaLinkServerUrl value but not for one of ...
4
votes
3answers
1k views

Creating media items creates duplicate folder names

I'm importing several thousand of documents in the media library programmatically. The document are organized in folders. public MediaItem AddFile(string fileName, string sitecorePath, string ...
4
votes
1answer
712 views

Sitecore media library - unable to load large files ( > 8MB) via Azure Front Door

We've run into an issue in Sitecore 9.3 where it's not serving media items properly via Azure FrontDoor with caching enabled. (Front Door works exceptionally well for 99.95% of the website). But a ...
4
votes
2answers
582 views

Good or bad:: Keeping large volume of documents in sitecore 8.1 Media Library

Do we have any limitation for documents( pdfs , excels , msword ) in media library in sitecore 8.1. Actually We are planning to upload around 60,000 documents in media library. As I know the purpose ...
3
votes
1answer
653 views

Clarification sitecore Dianoga Module

I'm working on performance tuning the sitecore media images. Noticed Dianoga module. Appreciate if some one can help clarify below: Does this module optimize the image parameter such as w,h etc. ...
3
votes
2answers
790 views

Sitecore Query to Identify Media Items with no attachment

I'm trying to write a query to select media items which have no attachment. Is there some default value for empty images which can be used in a query? I'm trying to use /sitecore/content/Tennant/...
2
votes
2answers
2k views

Sitecore image upload versioning in Media Library

How I like to add versioning for an image in media library in Sitecore 8.0. Please suggest me how can I do the version of an image?
2
votes
2answers
828 views

Can I force the old Upload File interface instead of the new Batch Upload when uploading multiple media items?

After upgrading to Sitecore 8.2.something (currently Update-5), some users began to notice that the functionality to upload multiple media items at once changed. Before the functionality was such ...
13
votes
4answers
7k views

How to upload an image programmatically from URL

I have a task to upload an image into Sitecore's media library programmatically given the url to the image. How would I make this possible?
5
votes
1answer
493 views

Sitecore Publishing Service 1.8.0 does not publish blob data for custom field using type Attachment

I've created a new file template called Code which contains many of the same fields as the File template but does not inherit it. While publishing using the Sitecore Publishing Service the blob data ...
3
votes
1answer
501 views

Is there a GetDefaultMediaUrlOptions function?

Does Sitecore (7.2+) have something like Sitecore.Links.LinkManager.GetDefaultUrlOptions() except for media URLs? We have a library of extension methods off of Item to make things easier and it looks ...
3
votes
2answers
1k views

Prevent Width\Height styles when resizing image in RTE

When inserting Images into RTE content, images are rendered as this: <img src="-/media/AS15F536E453B97C2GJI6901F55GG.ashx?h=857&amp;w=1523" height="857" width="1523" /> This works fine ...
3
votes
1answer
2k views

Image Not Being Resized Properly (Sitecore 8.1 rev 160519)

We are in the beginning stages of a site and so there is very little custom code introduced at this point. I've noticed that images are not being resized properly. I originally thought the hash ...
2
votes
2answers
763 views

How to disable analytics for media request analytics failed Exception: System.InvalidOperationException

Basically, I disabled xDB fully on web site, but I still see errors from Analytics ERROR Media request analytics failed Exception: System.InvalidOperationException Message: Tracker.Current is not ...
1
vote
1answer
1k views

Creating Media Items using the RESTful ItemService API

Quick background, re-building a "product importer" exe that was written for v7 using the old web API and ideally want to replicate all the old logic to work in the new v8 site using the RESTful ...
1
vote
2answers
576 views

MediaCreator.CreateFromStream creates an item with the template "File"

I'm using Sitecore.Resources.Media.MediaCreatorOptions and Sitecore.Resources.Media.MediaCreator to programmatically create media items. I've set the MediaCreatorOptions.FileBased property to false ...
1
vote
1answer
316 views

Render image with display name by default

I am using HtmlString to render my images by default so I can edit the image in the expierence editor. I am using the fieldrenderer model.AllgemeinSaxoprintLogo = new HtmlString(FieldRenderer....
1
vote
1answer
322 views

Sitecore Zip File Media Item Auto Downloads in Content Editor

I have a Sitecore media item in my media library that contains a zip file. In the content editor, when I navigate to this item, it starts the download of the zip media asset. Also, the usual zip icon ...
0
votes
2answers
169 views

Force download .txt files from UI

I'm using Sitecore 9.1.1 and SXA 1.8.1. I have a case in which i need to make some files downloadable for the user when he clicks on it. I was able to make the files with "pdf and docx" extensions ...