I have used sitecore 8.1 version. recently and i
have faced one issue that if in media library have duplicate item name
but extension was different, it was not download both file.
Please see below items of as example:
Please see below items of as example:
- ROI.pdf
- ROI.docx
- /~/media/ROI.docx
- /~/media/ROI.pdf
The problem is that both media items have
the same name, which is not recommended by sitecore. When you access the item with a
direct link the media handler does not take into account the .pdf
extension. It uses only the item path. Because of this it may return
unexpected results when you have items with same names on one level.
You have 3 options to fix this issue:
1. Move items to different folders.
2. You can create items with different names
for different file types. If you enable the
Media.IncludeExtensionsInItemNames setting in sitecore.config, the file
extension will be included automatically in the item name when you
upload it to the Media Library.
3. You can disable the Media.UseItemPaths
setting in sitecore.config. After this Sitecore will create links to media
items using their IDs, not the full path:
For Example:
<a
href="~/media/4A9EA5A5A7214B2182DE1085B3EB7284.ashx">.
Might be its helpful to you, Keep smile and keep coding :)
No comments:
Post a Comment