sitecore-media-library

Sitecore.Resources.Media.MediaCreator deletes versions of media

与世无争的帅哥 提交于 2019-12-24 08:32:06
问题 I am adding images to the Media Library using the "Sitecore.Resources.Media.MediaCreator" and the "CreateFromStream"-function. Everything seems to work fine except that everytime I add a new image to an already existing image item the old image is overwritten, I would like to create a new version instead and add the new image to the new version, keeping the old version and image. The images should be based on an "unversioned" template as images are shared between languages. I have tried

How to generate media item link with id instead of path in Sitecore

廉价感情. 提交于 2019-12-12 11:06:39
问题 Anyone knows how to generate links in sitecore with ID instead of item path? If you use GetMediaUrl method from the API, I can get this URL: /~/media/Images/Archive/content/News and Events/News_and_Events_Level2/20070419162739/iwhiz3.jpg The problem with this approach is that if someone changes the media item name, removes it somewhere or deletes it, the above link will break. I notice if I insert a media link from rich text editor, I get the link as below: /~/media

Sitecore versioned image not loading

爷,独闯天下 提交于 2019-12-12 09:48:24
问题 I'm running Sitecore 6.5 and have a data template that has an image field and an item that's based on that template. The site had two languages. If I use a versioned image (one item in the media library with En and Fr versions) in the En and Fr versions of the item then publish the site and switch the language in the site using query string, sc_lang=en or fr, everything changes in the page except for the image. But if I use two different images (two items in the media library) then the

Clone sitecore Media Library image folder

♀尐吖头ヾ 提交于 2019-12-11 12:59:31
问题 I have more than 500 images in Sitecore Media Library each image size is more than 1MB. Currently we are displaying these images as thumbnails in webpage but it takes more time to load. So I planned reduce the size to less than 50KB for thumbnails and which click the image it shows the original size image. So how can I programmatically clone all the 500 images and compress the size in Sitecore? 回答1: Sitecore has builded solution for resize image due to the size of image will be smaller. You

Set MediaItem on ImageField

允我心安 提交于 2019-12-10 20:24:20
问题 Currently mediaItem.Src is throwing an obsolete warning and states using the MediaItem property instead. The mediaItem.MediaItem has no setter though. Is this warning really just to get people to use something like: var image = new Sitecore.Data.Items.MediaItem(imageField.MediaItem); Sitecore.Resources.Media.MediaManager.GetMediaUrl(image); Is .Src (and related field properties) still the recommended way to actually set the field's value? 回答1: I believe you'd set the media ID instead of the

Sitecore - 2 Media items. Same filename, different extensions

纵饮孤独 提交于 2019-12-08 05:23:14
问题 If you have 2 media items that have the same name but different extensions, Sitecore cannot differentiate between them. For example: /~/media/myfile. pdf /~/media/myfile. doc When these URL's are requested, the PDF file is returned in both cases. I understand that that Sitecore ignores the extension in the request, and that the real problem is in fact, that I essentially have two items with the same path in the media library: sitecore/media library/myfile However, I do think it's a reasonable

Sitecore - 2 Media items. Same filename, different extensions

大兔子大兔子 提交于 2019-12-06 14:51:44
If you have 2 media items that have the same name but different extensions, Sitecore cannot differentiate between them. For example: /~/media/myfile. pdf /~/media/myfile. doc When these URL's are requested, the PDF file is returned in both cases. I understand that that Sitecore ignores the extension in the request, and that the real problem is in fact, that I essentially have two items with the same path in the media library: sitecore/media library/myfile However, I do think it's a reasonable that our customer would want to store both PDF and DOC versions of the same document in a single node.

Sitecore versioned image not loading

前提是你 提交于 2019-12-06 03:40:24
I'm running Sitecore 6.5 and have a data template that has an image field and an item that's based on that template. The site had two languages. If I use a versioned image (one item in the media library with En and Fr versions) in the En and Fr versions of the item then publish the site and switch the language in the site using query string, sc_lang=en or fr, everything changes in the page except for the image. But if I use two different images (two items in the media library) then the correct image loads when switching between languages. Any idea to why this happens? Thanks T Update I tried

Sitecore text search in PDF or Word documents

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 02:53:23
问题 I want to find out if it's possible to configure Sitecore's Lucene search engine to index PDF or Word documents? I've looked on the Sitecore support site at this document (http://sdn.sitecore.net/upload/sitecore6/65/sitecore_search_and_indexing_sc60-65-a4.pdf) but it mentions creating a file crawler class which suggests to me that it's only possible to achieve this by writing custom code. If I do need to write custom code to do this, would I also need to have some API in order to extract the

Sitecore text search in PDF or Word documents

与世无争的帅哥 提交于 2019-12-03 20:13:59
I want to find out if it's possible to configure Sitecore's Lucene search engine to index PDF or Word documents? I've looked on the Sitecore support site at this document ( http://sdn.sitecore.net/upload/sitecore6/65/sitecore_search_and_indexing_sc60-65-a4.pdf ) but it mentions creating a file crawler class which suggests to me that it's only possible to achieve this by writing custom code. If I do need to write custom code to do this, would I also need to have some API in order to extract the text content from PDF documents? Arnold Zokas I've recently had to do something similar on one of my