Page 1 of 1

Retain Date

PostPosted:Thu Aug 16, 2018 7:46 am
by nbodake
Hello All,

I have 6.3.6 CE running. We have been uploading old data now but the creation date is time when we upload file. How can we retain the date of document creation? Some documents are created in 2014, some in 2010 so how can we keep the creation date intact? We are using API to create folder and upload files as there are approx. 200,000 files. Below are the APIs:

create folder:
Code: Select all
curl -u $OKM_USER:$OKM_PASSWORD --write-out %{http_code} -X POST --silent -H "Content-Type: application/json" -d "$OKM_PATH"$DIR"" "$OKM_SERVICE/services/rest/folder/createSimple" 
upload file:
Code: Select all
curl -u $OKM_USER:$OKM_PASSWORD --write-out %{http_code} -X POST --silent -F "docPath=$OKM_PATH"$FILE"" -F content=@"$FILE" "$OKM_SERVICE/services/rest/document/createSimple"
Please help.

Re: Retain Date

PostPosted:Fri Aug 17, 2018 2:38 pm
by jllort
This is an old discussion, not easy to be explained. Basically, OpenKM has a date when the information it has been created into, this is important an relevant for audit reasons ( like the user who uploaded etc... ), in the other hand, you have a property of the document what is the date when it had been created ( or another relevant information like user who created, title or description etc. ).

Two dates are relevant, but my suggestion always does not change the OpenKM creation date. The information about the date, not always is into the binary file, almost is only available from OS, that means when you are sending binary data across the API, these data do not come with into the binary stream (another time it comes, like word files what into it contains its own metadata -> but let's focus on the regular case, that covers all the cases ).

My suggestion is to create metadata fields for storing this kind of information. While you uploading data might capture extra information like DateTime in the OS and update uploaded files.

If you decide to go in direction of change Document creation date into OpenKM I will try to guide you on how doing it.