Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

mherwig/tfk-api-unoconv

 
 

Repository files navigation

tfk-api-unoconv

Unoconv as a webservice based on zrrrzzt/tfk-api-unoconv by Geir Gåsodden using a different unoconv wrapper

Docker

Build image

$ docker build -t unoconv-webservice .

Run image

$ docker run -d -p 80:3000 --name unoconv-webservice unoconv-webservice

Usage

Post the file you want to convert to the server and get the converted file in return.

See all possible conversions on the unoconv website.

API for the webservice is /unoconv/{format-to-convert-to} so a docx to pdf would be

$ curl --form file=@myfile.docx http://localhost/unoconv/pdf > myfile.pdf

Formats

To see all possible formats for convertion visit /unoconv/formats

To see formats for a given type /unoconv/formats/{document|graphics|presentation|spreadsheet}

Versions

To see all versions of installed dependencies lookup /unoconv/versions

Healthz

Are we alive? /healthz

returns

{
  uptime: 18.849
}

Environment

You can change the webservice port and filesize-limit by changing environment variables.

SERVER_PORT default is 3000

PAYLOAD_MAX_SIZE default is 1048576 (1 MB)

TIMEOUT_SERVER default is 2 minutes (120 000 milliseconds)

TIMEOUT_SOCKET default is 2 minutes and 20 seconds (140 000 milliseconds)

Change it in the Dockerfile or create an env-file and load it at containerstart

$ docker run --env-file=docker.env -d -p 80:3000 --name unoconv-webservice unoconv-webservice

License

MIT

About

Unoconv as a webservice

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 91.5%
  • Dockerfile 8.5%