Document Host
The Document Host (Docuhost) service provides a REST endpoint to upload demo-generated documents for temporary storage. Documents can be retrieved via the short link returned in the upload response.
Getting Started
Prerequisites
- Kubernetes 1.21+
- Helm 3.1+
- MongoDB 4.4+
The application is designed to be installed in Kubernetes using a Helm chart. Files are stored in MongoDB using GridFS so, prior to deployment, an instance of MongoDB 4.4.x is required (tested with v4.4.12).
Installation
The chart is available via the SPT Chart Library. See the instructions in that repository for steps to clone the library.
To install the chart with the release name docuhost
:
$ cd charts
$ helm upgrade --install docuhost ./docuhost --namespace=demo-prod \
--set db.user=admin,db.password=s3cr3t
These commands deploy Docuhost to the Kubernetes cluster in the demo-prod
namespace. The parameters for the database username and password are set to admin
and s3cr3t
, respectively. See the Parameters section of the README for a list of the parameters that can/need to be configured for a successful installation.
Usage
A sample request and response are provided below.
Sample Request
HTTP POST /v1/documents
{
"filename": "simple.pdf",
"contentType": "application/pdf",
"fileBase64": "JVBERi0xLjc[...]zd="
}
Sample Response
{
"id": "61f0023ee260d827b7156c55",
"filename": "simple.pdf",
"contentType": "application/pdf",
"url": "http://docuhost.localdev/v1/documents/61f0023ee260d827b7156c55",
"shortLink": "https://tiny.one/yckaxkhv"
}
Roadmap
See the open issues for a list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
)
- Commit your Changes (
git commit -m 'Add some AmazingFeature'
)
- Push to the Branch (
git push origin feature/AmazingFeature
)
- Open a Pull Request
License
Copyright (c) 2022 Quadient Group AG and distributed under the MIT License. See LICENSE
for more information.
Robert Tucker - @robertwtucker
Project Link: https://github.com/robertwtucker/document-host