Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

What I did

I created a multimedia component (Image name: demo.png) and published it. I found demo.png on presentation server.

In the same component, I changed the image to demo2.png and published it. I found demo2.png on presentation server but demo.png was missing.

What I expected

I expected that demo.png and demo2.png both will be available on the presentation server.

Please help me to understand the flow.

Where is the mapping stored? I will like to see how are they stored because what i understand the engine resolves the images and publish them in package.

I will also like to understand, how the delete is triggered and from where.

share|improve this question
    
Your edit regards the mapping seems to extend this from the original question so I'd suggest you mark one of the answers below as an answer (or respond as to why they are not suitable) and create a new question - although most of the answer to the second 'part' will be to review the documentation and use the API. –  Dylan .. Mark Saunders Sep 4 at 17:10
    
I agree--the mapping would be good as a separate question. Though most probably won't find the answer without reading all of the documentation and testing both scenarios: implicit and explicit publishing and unpublishing. Frank van Puffelen explains the difference in his Binary Event Tracker extension. –  Alvin Reyes Sep 7 at 7:23

2 Answers 2

up vote 13 down vote accepted

This behaviour is normal. Tridion keeps a list of all published multimedia components and their actual files on the file system. If you would change the name of a file in the multimedia component and republish it, it will update this record, and remove any old files, and put the new file in place.

If this wouldn't happen, the server you publish to would be filling up with old (stale) images. If you wish to publish both demo1.png and demo2.png, then you should create two multimedia components

share|improve this answer
1  
And to be honest, I think this is a great feature. –  Nuno Linhares Sep 4 at 12:52

If for any reason you require the same image in the CMS to be published with different names (Example: You are resizing the image, create an additional thumbnail version, etc...) is also possible using an overload of the method RenderedItem.AddBinary where you specify a variantid, so there is no conflict between both published files coming from the same source in the CMS

public Binary AddBinary(
    Stream content,
    string filename,
    StructureGroup location,
    string variantId,
    Component relatedComponent,
    string mimeType
)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.