Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binaries always have the TCM uri appended to the filename #30

Open
willprice76 opened this issue Dec 11, 2018 · 1 comment
Open

Binaries always have the TCM uri appended to the filename #30

willprice76 opened this issue Dec 11, 2018 · 1 comment

Comments

@willprice76
Copy link
Contributor

willprice76 commented Dec 11, 2018

It would be good if there was more flexbility in the filename generated for binaries for certain schemas. In our case we want PDF downloads to not have the tcm uri appended, as this is a file that people will download to their local machine.

This could be done by having some further logic in the DefaultModelBuilder and DataModelBuilder when calling the RenderedItem.AddBinary method (this has implementations which allow you to specify the filename).

https://github.com/sdl/dxa-content-management/blob/da4925df268846b16bb29d431383e8728743633e/Sdl.Web.Tridion.Templates.R2/Data/DefaultModelBuilder.cs#L200

https://github.com/sdl/dxa-content-management/blob/da4925df268846b16bb29d431383e8728743633e/Sdl.Web.Tridion.Templates.R2/Data/DataModelBuilder.cs#L348

@rpannekoek
Copy link
Contributor

There is a broader issue here. Suffixing of binary file name with TCM URI is done to prevent file name/URL uniqueness issues when all binaries are published in a single location (“Multimedia URL” configured on Publication).

Content Manager also support publishing binaries in Structure Groups (without TCM URI suffix), but this is currently not supported by DXA (neither on CM-side nor in the Web App). This is indeed missing functionality (which ison the backlog).

In general, it should be possible to customize how/where binaries are published and the DXA Web App should be able to deal with binaries which are published in a Structure Group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants