6

Current setup:

I have a image stored in multimedia component. Multimedia component is linked from component A.

Component A is published with dynamic CT (Language REL) to broker DB.

Storage configuration on the deployer side is set to store binarys to the DB

<Item typeMapping="Binary" cached="false" storageId="MSSQL_01"/>

In broker DB, in the BINARY_CONTENT table I have new entry for my multimedia component.

In broker DB, in the COMPONENT_PRESENTATIONS table I have entry for my Component A

<h3>Hi</h3>
<p>there !</p>
<img src="/pub1/Images/testimage5.jpg" >

So, in the broker DB I have a reference to a image file on the file system, but file is not there.

When i call this CP on the page, I have the same output as in the DB, img tag pointing to non existing file

What I would like is to have an image displayed on the page (image from Broker DB). What am I doing something wrong?

12

The setup is correct, and the rendered output is correct as well. However, you will need to create some code to handle images stored in the DB by your webserver. Your webserver is not able to do this by default, and Tridion also doesn't have something like that out of the box.

I'm not sure if you are using DD4T or not. DD4T does have a module that takes care of all this. You can find more information on that module here http://blog.trivident.com/2013/08/inside-dd4t-handling-binary-files/

If you don't use DD4T, you will have to build your own module, but i'm sure you can find all necessary code in the DD4T module.

Basically, it works like this

  • intercept all requests for image files
  • check the image url and query the broker to see if the image exists in DB
  • get the binary data of the image back from the broker db
  • create an image (cache it for future requests if needed - this is preferred for performance reasons), and serve it to the browser.
  • 1
    The CWA also has modules to handle the delivery-end of this scenario. From what you describe, it sounds like it does the same as DD4T (and only pre-dates it by a decade or so). – Frank van Puffelen Oct 1 '14 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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