Hot answers tagged

16

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 ...


12

A while back I've written a TBB that does exactly what you want, including checking if a Structure Group exists that mirrors the path of the Folder (based on relative WebDav paths). Here is the link: http://www.tridiondeveloper.com/publish-an-image-to-a-structure-group-mirroring-folder


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 ...


10

I'm not sure there is a correct answer here... i think it's based on the client needs. Here's an opinion... It's now possible to store binaries in the broker database, it makes a great case for managing them in the CMS, so that external 'consumers' (development teams, partner websites, load balanced machines, etc) can consume / store these files and ...


8

The problem here is that the DD4T LinkFactory class only looks for regular component links. It only queries the link_info broker table, which does not contain links to binaries. When we had to implement a similar functionality, we had to customize the DD4T code. What you could do is something like this create a custom LinkFactory class, inheriting from ...


8

Here is the logic that I use with clients (and chiming in with what Alvin said): C# is code, therefore belongs in a code repository (e.g. SVN). Java is code, therefore belongs is a code repository. SQL scripts is code, therefore belongs is a code repository. .... should I go on? So what makes JavaScript or CSS any different? It is code that also needs to ...


8

I agree with John that it would be based on the clients needs, but also in relation to what development and deployment model you have chosen. When looking at the different implementation options, I like the simplicity of having HTML in your (DWT) Templates and then often will go for Publishing CSS and JS as Pages (personally hate the idea of using ...


6

I think Bart and John did a good job explaining the mechanisms of how to deal with CSS/JS. I want to chime in regarding whether to publish them as binaries or not. I am a strong believer that you should not store CSS/JS as binaries (i.e. Multimedia Components). I don't think it's the right way. The whole contention point starts with the way these assets are ...


6

I'd personally keep them outside Tridion because both Javascript or CSS files do not really relate to the content managed in the CMS, specially when using a framework such as DD4T


6

In order to achieve this I suggest reading the API manual, and look for the AddBinary() method. This will allow you to publish the file with a specific filename, and bind it to a Structure Group. You will need to make Structure Groups to match your Folder structure in order to fully achieve what you want.


6

Based on your question, it looks like you want to publish binaries to a certain location. You can add configuration in the cd_storage_conf on the deployer to deploy the binaries at any given location. Step 1: add the new storage under "Storages" assuming you have a different default storage for all other content <Storage Type="filesystem" Class="com....


6

When you call AddBinary() you are responsible for ensuring that the binary will have a unique location on the content delivery file system. If you are not specifying a structure group, then all your binaries will end up in the folder specified in the Images Path property of your publication. As the editors can upload images with duplicate filenames, this ...


5

The solution is while creating Component Template in Template Builder, select Default Finish Action, click the Parameters tab and select desired SG in Binaries target structure group.


5

AFAIK, when you create component links in the RTF field, Tridion does not generates the binary link. You may refer the Process Download Links in Output extension for this purpose. This was written for SDL Tridion 2011, but hopefully may work for SDL Tridion 2013 as well.


5

DD4T comes with an HTTPModule to stream binary content out of your MVC application. It does not otherwise expose APIs to access binary content stored in Tridion. You could of course just use the Tridion API directly (not the one you mention; that's a CM API; use the .Net CD API): (new BinaryFactory()).GetBinary(tcmUri).InputStream or (new BinaryFactory())....


5

Considering the fact that you need script and styles all across DTAP (Dev, Test, Acceptance, and Production), JS and CSS files should probably follow the same development processes as application code. The biggest benefit to placing these in the CMS is the "managed" part, which echoes Mihai's points: History Versions and comparisons Publishing and ...


5

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 ...


5

The reason that there are two images produced (one per publication) is because they are separate images, even if they are shared components. At the moment your images are the same (as they are both shared from Publication A), however if you where to localize the image in Publications B and C and upload a new image to each publication the images will now be ...


5

This is a known issue in DD4T. The root cause is that a non-existing image was requested. When somebody tries to access a non-existing image url (in a non-existing folder), the BinaryFactory creates the new directory first, and puts an empty placeholder file inside it. If the image does not exist in the broker, the factory performs a cleanup by deleting the ...


4

As Chris mentioned, the addBinary method (from the namespace: Tridion.ContentManager.Publishing.Rendering.RenderedItem) is what you need, here's the options available: AddBinary(Component); AddBinary(Component, String); AddBinary(Component, StructureGroup); AddBinary(Component,StructureGroup, String); AddBinary(Stream, String, String, Component,String); ...


4

Binary links aren't resolved at the application side since their URL is known at publish time. They should be resolved there. I think linking to Binaries in Rich Text should be in the next version of DD4T (which I think will be called 2.0) In the meantime you could write a C# TBB which parsed the output from the DD4T TBBs and checked whether the links were ...


4

A pdf is also a multimedia item except it doesn't render on any page like images. If you place url of any pdf on any link or anchor tag, on link click it will automatically download that pdf file. DXA cache these files inside media folder of BinaryData folder of corresponding publication. I believe you have published pdf components at structure group path ...


4

Can you go to the Event Viewer on the CM server and grab the entire stack trace for this error? Couple of thoughts: 1)System.OutOfMemoryException seems would be due to lack of actual system memory, despite your config changes. Look up generic Windows reasons and remedies for this. 2) error states "error downloading file...from ...


4

Binary should be treated as a separate entity similar to pages and component presentations. In your case, you would need your Rest service to serve your binary as a stream. Like Mark highlighted, you would only need the relative path in the JSON to avoid further manipulation. A DD4T relevant example can be found at https://github.com/dd4t/DD4T.RestService....


3

In the old COM API's TCMScriptAssistant class, which has it's methods exposed to VBScript templates, there is an AddBinary method which I think you are looking for... Documentation is as follows: AddBinary Summary Writes binary data from a Multimedia Component to a temporary directory so that the publisher can retrieve the file and publish it to the ...


3

Currently I'm using a workaround: by extending the BinaryDistributionModule I can configure the use of a different IPublicationResolver but it's not a very nice solution and sort of defies the purpose of using IoC: /// <summary> /// Extension of the BinaryDistributionModule to allow the use of a custom publication resolver. /// </summary> public ...


3

try to increment the MaxSize parameter in your cd_deployer_conf.xml also you can change the next file $Tridion_Home\Content Porter\ImportExportService\web.config change the value of “maxAllowedContentLength” to “209752100” (to allow files until 200mb) <security> <requestFiltering> <requestLimits maxAllowedContentLength="209752100" /&...


3

Timeout does not seem to be the issue if you get an immediate success message. If there's a timeout, I would expect a failure at possibly the commit stage of publishing. When you publish the file, open the dropdown of the publishing window to check if items are actually being published. The multimedia component need to be added to a page (if embedded) or ...


3

DXA assumes that Binaries (Media Items) are published under the "Multimedia URL" as configured on the CM Publication. This will happen if you publish the Binaries without specifying a StructureGroup. You could also create StructureGroups which reflect the MultimediaUrl and publish your Binaries in that SG subtree. Anyways, DXA assumes that the URL of ...


3

@Shiva already answered might helpful for using .NET CIL. To get the Binary using Java CIL. Java Example: import com.sdl.web.api.dynamic.BinaryContentRetrieverImpl; import com.sdl.web.api.dynamic.DynamicMetaRetrieverImpl; import com.tridion.data.BinaryData; import com.tridion.dynamiccontent.DynamicMetaRetriever; import com.tridion.meta.BinaryMeta; import ...


Only top voted, non community-wiki answers of a minimum length are eligible