English | 简体中文
space-filepreview is an asynchronous file preview and thumbnail service.
It works with aospace aofs to asynchronously generate thumbnails or previews of files uploaded to AOspace.
Read the event of uploading a file from redis, and according to the content of the event, process the corresponding file to generate a thumbnail or preview document
The preview file mainly supports
- office documents
- pdf documents
- txt and other text documents
Image thumbnails support formats consistent with preview-generator
Including common, jpg, png, webp, gif, bmp, heic and so on.
10bit heic format is not supported by some Android phones at the moment.
- Python >= 3.5
Take Debian GNU/Linux 11 for example.
apt-get install poppler-utils qpdf libfile-mimeinfo-perl libimage-exiftool-perl ghostscript libsecret-1-0 zlib1g-dev libjpeg-dev ffmpeg
pip install -r requirements.txt
go into project root path,and run
docker build -t local/space-filepreview:{tag} .
python main.py
Environment
REDIS_HOST: aospace-redis
REDIS_PORT: 6379
REDIS_PASSWORD: "placeholder_mysecretpassword"
BUCKET_SOURCE: "eulixspace-files"
BUCKET_TARGET: "eulixspace-files-processed"
ROOT_DATA_DIR: "/data/"
LIBREOFFICE_PROCESS_TIMEOUT: 900
DEBUG_MODE: 1
Contributions to this project are very welcome. Here are some guidelines and suggestions to help you get involved in the project.
Finally, thank you for your contribution to this project. We welcome contributions in all forms, including but not limited to code contributions, issue reports, feature requests, documentation writing, etc. We believe that with your help, this project will become more perfect and stronger.