Hot answers tagged


You need to create a model first for your media items, e.g.: [SitecoreClass] public class MediaFile { [SitecoreField("Attachment")] public virtual Stream File {get; set; } [SitecoreField("MimeType")] public virtual string MimeType { get; set; } [SitecoreField("Title")] public virtual string Title { get; set; } [SitecoreField("...


Did you create variant items under reference field? You need to display something in order to render a link. It works fine on my machine. Here are screenshots with the setup: Template Content Media Library (Title field is not filled automatically) Variant (pass through: File) Results in EE


The reason is that Siteore use the associated icon from the OS. Acrobat Reader is installed on your laptop, not on your SITserver. So the SIT server displays a default icon instead. You can specify which static file to use for which extension in the web.config. To add the PDF icon, do the following: Download a .pdf icon from the Adobe Website (due to ...


No, there is no built-in way to do this. You can build a module that converts the files to PDF using iTextSharp, PhantomJS or Puppeteer. Once upon a time @adamnaj wrote a script to export media items to PDF using Sitecore PowerShell Extensions. Maybe you can use that idea to import them back into the media library after PDF generation.


I am using the below patch configuration file for Sitecore 9.1 (Initial Release) and SXA 1.8 to stop the download of PDF files. It works fine for me <?xml version="1.0" encoding="utf-8"?> <configuration xmlns:patch=""> <sitecore> <!-- Force download of PDF files --> <mediaLibrary> ...


As mentioned here already, the Recycle Bin is keeping deleted files. If you want to change the pdf that is attached to the media item, you can detach it and attach a new one - this will change the pdf but the item (and the url) will stay the same. Info about the attach/detach can be found here:


Sounds like you are missing the needed IFilter to index pdf content. Check for the information on 9.1: The Sitecore Content Search API uses the native Microsoft Windows IFilter interface to extract the text content from media files for indexing. ...


There is alot of good blog posts about this: E.g. And as jrap commented, you should just combined multiple predicates. So Something like: var templateQuery = PredicateBuilder.False<ContentSearchResultItem>(); templateQuery= templateQuery.Or(item => item....

Only top voted, non community-wiki answers of a minimum length are eligible