I'm new to AEM technologies and been going through documentation, Internet and this forum looking for the best solution to apply.
We have a solution that uploas pdf files to a DAM using a webservice. we want to modify this solution to upload the pdf files now to "Assets" and assign metadata to the uploaded asset, I found that there are a few options as:
HTTP API POST requests to handle the upload of files. HTTP API
since are http requests can be done easily in Java application
Fits to our needs since are very basic tasks (upload & assign metadata)
The documentation is not clear about how to make the requests, tried Curl and could create folder but file upload is not working with the parameters of the manual.
You can define a scheduler service that implements Runnable and have the scheduler kick off every so often. Say one every 2-3 hours. The service can scan a watched folder and them pull in any PDF it finds in the folder. Something like this:
In your Service - use the Asset Manager API to place the PDF files into the AEM Dam. This article pulled in files into the AEM JCR, however, its an example and you will need to modify it to work with PDF files and also where you want to place the PDF files in the AEM JCR. .
edubey, I was creating POST request using POSTMAN to test. I will put here later today the command I'm using.
So there is still the challenge to set the metadata for each asset. I did not mentioned before but the goal is not bulk upload but one by one since each PDF file need specific metadata. Even if we can bulk upload all, I sill need the reference to each one to add the required metadata one by one.
I'll think a bit on the options and get back to you on what we applied in case this can be of use to anyone else in the future.