Download document with direct link

You can download a document from OpenKM using a command line utility like wget. There is a service with BASIC authentication for this task. You can reference a document by UUID using the uuid parameter or by path, using the path parameter. In the same URL you need to specify the user and password.

When you share the user and password for downloading files is a good practice configure the user profile disallowing all the features. That will lock UI access to the user.

Available parameters:

  • The parameter uuid is the document UUID
  • The parameter path is the document path.
  • The parameter inline set when document must be downloaded as attachment or shown inline. It's a boolean parameter, allowed values are true or false.

When you use parameter path, it is a good practice to encode url to prevent problems with special characters.

Sample:

http://user:password@localhost:8080/OpenKM/Download?uuid=4ca63b87-e340-443e-aeef-6c7e2fb57aea
http://user:password@localhost:8080/OpenKM/Download?path=/okm:root/test/test.doc

This ease some integration tasks:

$ wget http://okmAdmin:admin@localhost:8080/OpenKM/Download?uuid=xxx-yyy-zzz