• Importing files from a zip file

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #515  by arnk
 
Hello OpenKM

I am setting up a new system for the first time. I have all my files in a zip file on a usb drive in my Debian Linux server running OpenKM.

I logged in as system and went to Administration and Import

This just returned a null in the box below.

I then went to Add Document and clicked the Import documents checkbox and browsed to my zip file. This worked but

All my file dates are set to today - this is not very helpful. Is there a way to retain the original file dates for the first versions of the files?

I have created a new group called \"Engineering\", but I cant see how to only give write permission to a folder to only members of that group.

Thanks
Al
 #516  by jllort
 
We\'ll these are several questions:

1- About importing on system menu. Must select server path, like /home/user1/ and repository path to import files like /okm:root ( or /okm:root/folderX if some of this are path are bath you\'ll get some error ).

2- About date from files uploading or importing. Always each file uploading on OpenKM save actual date. It\'s date you\'ve inserted, updated, etc... on OpenKM not others. It\'s not the date of the document is the date of the document uploading, operation time.

3- About permissions on a group called \"engineering\" do it:
3.1- Set rol engineering to folder
3.2- Remove userRol ( at startup this must be set by system read only on okm:root , not propagate userRol because all users must have it, it\'s connection one ).

Tell if this solves something ?
 #524  by arnk
 
Hello jllort thanks for your help.

1) I had not created a directory on the server beforehand so I did not have a repository path. I tried to import a zip file using a repository path, but that failed, but I did partially succeed by importing a directory from the extracted zip file. See 4)

2) Yes I agree for updates, but for the initial seeding of documents as user \"system\" then you want to maintain the original file dates for the first version. It is unlikely that a user will install OpenKM before starting a project, it is more likely to be something that they will import existing data into. This is a real showstopper.

3) Thanks, the permissions did change for the top level folder, but not for the folders directly beneath it. When I changed them in turn the recursive change did work for all the lower level directories.

4) When importing I had several shortcuts which are web links. These end in .url and are MIME type application/internet-shortcut. I followed the following procedure to add the MIME type, but I currently can not get OpenKM to start up (The requested resource (/OpenKM) is not available.)

To add a new MIME type .url

Go to /JBOSS/server/default/deploy/OpenKM.ear

Using the (Debian Linux) file browser copy the OpenKM.ear file to your home directory

Rename it to OpenKm.ear.zip

Extract the files

Rename OpenKM.war to OpenKM.war.zip

Extract the files

Inside the file OpenKM.war look into /WEB-INF/classes/es/git/openkm/core/. These are the mime types. Add the new mime type, eg

for .url add under heading Others

application/internet-shortcut url

You need to add an mime type icon. Into OpenKM.war look at /es.git.openkm.frontend.Main/img/icon/mime/.
Here are all the icons for the registered MIME types.
So for this example copy the /text/html.gif icon to /application/url.gif

Right click and create archive type .war and then rename it to OpenKM.war

Delete the extracted file directory

Delete the old OpenKM.ear file

Right click and create archive type .ear and then rename it to OpenKM.ear

Delete the extracted file directory

Extract the files again from OpenKM.ear and check for the changes.

Copy the new file back to /JBOSS/server/default/deploy/OpenKM.ear

Stop and start openKm

/etc/init.d/openmm stop
/etc/init.d/openkm start


Thanks
Al
 #525  by jllort
 
We\'ll about point 2, first time importing files. I\'ll create on our tracking system a new enhancement to get on importing the real date of document creation. I\'m not sure if on next release it\'ll be implemented, because major issues of next release has been defined. We\'ll try.

About point 3 permissions. It could be some obfuscated. First must enable recursive change, and after it all operations are propagated to sub folders and document into.

About point 4. The answers is yes :) it\'s some tedious to add a new mime-type, but must be done at this way because it\'s not only to set on mime configuration file it must be uploaded some icon. If you tell us about some new mime type, like other users suggested on this forum. On next release will put by default.
 #528  by arnk
 
Hello Jllort

1) It works fine now with the full path. I have not succeeded opening a zip file directly, but it is no problem to extract them first.

2) Thanks that would be a good enhancement.

3) Yes ticking the recursive box before adding the new group seems to make the difference.

4) My new MIME type application/internet-shortcut .url imports OK, but the icon doesn\'t appear and when I click on the file in IExplorer it doesn\'t work, so I will look at doing that again. I just want to have shortcut links to various webpages stored in the archive. The reason I could not get OpenKM to start was that this OpenKM.ear file was not correctly zipped up. I could see that from the log file /usr/var/openkm

Thanks for your quick responses.
Al
 #529  by jllort
 
About changing .ear file.

I recomend you user winrar if you\'re on windows.
1- Extract OpenKM.war file
2- Not extract OpenKM.war file ... simply replace or add file using winrar.
3- After it put OpenKM.war into OpenKM.ear file

About importing shortcuts I don\'t know how it could run, it\'s extrange usage of a document manager ( hope you could understand me ? ).
 #530  by arnk
 
Hello Jllort

I found that I should have called the icon internet-shortcut.gif and not url.gif in my example above.

This worked in that my .url files import into OpenKM OK, but the shortcuts don\'t open. Not to worry I will create a html page of links instead.

(What I was trying to do was store shortcuts to webpages in our documentation. If on Windows you right click on the desktop and go new shortcut and put a webpage url in the location and a name in the title its a useful way or storing individual links. I have attached one as an example).

Thanks
Al [file name=OpenKM_Documenet_Management_System.zip size=268]http://www.openkm.com/images/fbfiles/fi ... System.zip[/file]
 #534  by pavila
 
If you use Linux, you should try mc (Midnight Commander) to manipulate the OpenKM.ear archive. You can add and modify its contents without unpackin and packin it.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.