0

I would like to un-publish binaries (PDFs) which are not being referenced in any of the component currently. How can I achieve that? please help

  • It's a DXA application and storing binaries in database. – Thakur Aug 25 at 14:06
  • can you add more details? Is it published dynamically? – Sayantan Basu Aug 25 at 15:40
  • No, static only – Thakur Aug 25 at 16:32
  • Tittle says you want to publish but the description says you want to unpublish? please explain bit more details what exactly you are trying to do? – Velmurugan Aug 26 at 4:53
  • It is unclear what you mean exactly with "binaries which are not being referenced in any of the Components". See my answer where I interpreted it as "binaries which do not have a related Component", but please be more specific in what you mean with it. – Rick Pannekoek Aug 26 at 12:24
1

I suggest that you use Powershell an Tridion Core service.

Get a list of tcmids you want to unpublish.

Then process the list of tcmids and generate tridion core service UnPublish transactions.

| improve this answer | |
1

The reason why you specify a "Related Component" when adding Binaries in the CM API is so the Binaries can be unpublished (indirectly, by unpublishing that related Component).

The (legacy) RenderedItem.AddBinary overload which does not take a relatedComponent parameter is marked as obsolete with the following warning: Adding binary data without specifying a related Component results in unmanaged binaries in Content Delivery. Use an overload which accepts a relatedComponent parameter.

So: AFAIK, there is no (supported) way to unpublish Binaries which were published without specifying a related Component.

| improve this answer | |
0

If I understand correctly you looking for static binary assets to be published to FS, those binary assets not been used in any component or pages metadata. if it's yes then it's possible.

refer to @Nickoli Roussakov's article nicely explained with sample code. http://www.tridiondeveloper.com/publish-an-image-to-a-structure-group-mirroring-folder

I hope it helps.

| improve this answer | |

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.