Page 1 of 1

File's original properties

PostPosted:Mon May 18, 2020 1:55 am
by brucecy92
Is it possible to use the file's original properties when uploading a new document?

Now if User x uploads the document it says that that user is the author. I have a lot of documents not made by me originally that I want to import, but I want the author to be set to the author of the file, not me.

Same goes for creation date and last updated date. I would like those to be the corresponding dates of the file, not when it was uploaded to the system.

Re: File's original properties

PostPosted:Tue May 19, 2020 6:02 pm
by jllort
Can be done, basically, you want to parse metadata values what contains file types like Microsoft Office or PDF. There're several ways for doing, maybe the easiest is to create your own automation at "post" stage. Because the document is in OpenKM simply you will need to process the file, in case of PDF, for example, using something like https://stackoverflow.com/questions/370 ... ing-pdfbox

Depending the document type the mechanism for extracting data and data type will be different. When you got values simply might add as OpenKM metadata fields. Next links might help you:
https://docs.openkm.com/kcenter/view/ok ... ction.html
https://docs.openkm.com/kcenter/view/ok ... ation.html
https://docs.openkm.com/kcenter/view/ok ... l#addGroup
https://docs.openkm.com/kcenter/view/ok ... tiesSimple
https://docs.openkm.com/kcenter/view/ok ... ition.html