How to migrate PDFs into DAM assets in AEM | Community
Skip to main content
Level 2
December 30, 2022
Solved

How to migrate PDFs into DAM assets in AEM

  • December 30, 2022
  • 2 replies
  • 2178 views

Hello,

 We are working on AEM 6.3.

 We have around a thousand pdf files stored under DAM path (as jcr:primaryType = nt:file) may be retained from old AEM versions and never migrated as DAM assets so far. Is there any OOTB option/tool to convert them into proper DAM assets with renditions, thumbnails etc? DAM authors need to access them now but they can't. because there's no preview for them. 

these PDFs are only accessible in crx/de for administrators now.

 

 I think we can create an endpoint (servlet) which triggers the DAM update asset workflow, taking these PDF paths as payload, but I just wanted to know if there's any other good approach for this.

 

Please let us know if there's any solution for this.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by digarg17

@rohitk31991147  : Not sure how anything under Dam path would be of type nt:file in AEM ? Can you try to download grom asset console and reupload and see if now the type changes to  dam:Asset ? 

 

If this works , use search filters - path type etc and do a bulk download and reupload. There are many ways to do bulk upload/download efficiently if above works.

2 replies

Adobe Employee
January 1, 2023

You can do this OOTB with bulk workflow manager tool of AEM ACS commons. Using query option - select all assets under a path having type as application/pdf and run dam update workflow .. if you have list handy u can put path of pdfs as well using List option of bulk workflow manager

 

https://adobe-consulting-services.github.io/acs-aem-commons/features/bulk-workflow-manager/index.html

Level 2
January 3, 2023

Hello @digarg17 Thank you for your reply, I logged in as admin but, somehow i am not able to trigger the workflow.

Adobe Employee
January 3, 2023

Use normal dam update workflow with runner type selected as Synthetic workflow multithreaded . Offloading is no longer supported I guess.Bulk workflow manager inherently takes care of offloadig and processing assets in batches.

aanchal-sikka
Community Advisor
Community Advisor
January 3, 2023

Hello @rohitk31991147 

 

I am a doubtful that "DAM Update Asset" Workflow will work on an nt:file. Please try on one file first.

- Go to Workflow console

- Select the workflow. Click on "Start Workflow"

- Add the asset as payload path.

 

Check logs.

 

Here we are trying to change the type of node itself. From nt:file to dam:Asset.

Aanchal Sikka
Level 2
January 4, 2023

Hey @aanchal-sikka @digarg17  thank you for your suggestions, but both the approaches are not working unfortunately, 

When I try to trigger the DAM Update Asset workflow on one PDF file, the Gatekeeper process itself is rejecting it with following exception : 

Process execution resulted in an error: com.day.cq.workflow.WorkflowException: execute: gatekeeping failed, asset [{/content/dam/abc.pdf}] in payload doesn't exist for workflow [{VolatileWorkItem_node1_etc_workflow_instances_server0_2023-01-04_update_asset_2}].

 the Gatekeeper process is checking if payload is of type Asset or not. If no, it's throwing this exception. I guess we cannot convert this pdf with nt:file type into dam:Asset in this case as @aanchal-sikka mentioned. 

 

With bulk workflow manager, i am able to trigger the "Dam update Asset" workflow with synthetic workflow settings, it shows the success status as well, but the pdf remains in same type (nt:file) and no changes there, and nothing comes up in logs as well.

 

Any other suggestions?

digarg17Adobe EmployeeAccepted solution
Adobe Employee
January 4, 2023

@rohitk31991147  : Not sure how anything under Dam path would be of type nt:file in AEM ? Can you try to download grom asset console and reupload and see if now the type changes to  dam:Asset ? 

 

If this works , use search filters - path type etc and do a bulk download and reupload. There are many ways to do bulk upload/download efficiently if above works.