document-preview-microservice

command module
v0.0.0-...-2418fd4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 21 Imported by: 0

README

Generate document previews micro service

A micro service for generating Generate document previews. The most common document and image formats are supported!

Build

docker build -t generate_document_previews .

Run

docker run -p 3030:3030 -e KEY=access_key -it --rm generate_document_previews

/api/preview

  • Method: POST
  • Body: Multipart form
  • Form data fields:
    • document: File
    • height: Number
    • width: Number
  • Required headers:
    • Authorization: Bearer $KEY
  • Supported file types
  • responses
    • 200: Image of content type image/webp
    • 500: Error string of type text/plain
    • 401: Unauthorized of type text/plain

Env:

  • $KEY Required: The Bearer key
  • $SOFFICE_PATH: If the soffice binary is not in the path you can set it in here
  • $PORT: Change the default port number (3030)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL