Recently, I was working on requirement of external media storage enable in sitecore 8.2 IR. During the development, I have observed some abnormal behaviour when delete any media item, which is created from copy or duplicate command.
After dig this behaviour in details, I found that the media item created using Duplicate/Copy To operation, both items (actual item and copied item) share the same blob reference in blobs table. So while we perform Delete operation on new copied item, it will remove media item as well as blob from blob table and due to that existing media item returns 404 Error.
In sitecore, There are two option available to manage delete operation and it is manage by below config entry of sitecore.config file.
<setting name=”RecycleBinActive” value=”false”/>
Option 1: RecycleBinActive setting is enabled in sitecore instance, then delete command work fine. Because the delete operation not remove blob entry from database.
Option 2: RecycleBinActive setting is disabled in sitecore instance, then the issue will be occur in delete operation, Because, while we perform Delete operation on new copied item, it will remove media item as well as blob from blob table and due to that existing media item returns 404 Error.
In our case, Sitecore Support provided us a patch (# 227925) that solved the problem.
Hope this helps you guys…!