mirror of
https://github.com/haiwen/seafile-admin-docs.git
synced 2025-12-26 02:32:50 +00:00
Enable thumbnails for other file types (#542)
Some checks are pending
Deploy CI - 13.0 / deploy (push) Waiting to run
Some checks are pending
Deploy CI - 13.0 / deploy (push) Waiting to run
* Enable thumbnails for other file types * Update thumbnail-server.md --------- Co-authored-by: Daniel Pan <freeplant@gmail.com>
This commit is contained in:
parent
5405602221
commit
01ddbba0f7
|
|
@ -1,6 +1,8 @@
|
|||
# Thumbnail Server Overview
|
||||
|
||||
Since Seafile 13.0, a new component thumbnail server is added. Thumbnail server can create thumbnails for images, videos, PDFs and other file types. Thumbnail server uses a task queue based architecture, it can better handle workloads than thumbnail generating inside Seahub component.
|
||||
Since Seafile 13.0, a new component thumbnail server is added. Thumbnail server can create thumbnails for images, videos, PDFs and other file types. Thumbnail server uses a task queue based architecture, it can better handle workloads than thumbnail generating inside Seahub component.
|
||||
|
||||
Use this feature by forwarding thumbnail requests directly to thumbnail server via caddy or a reverse proxy.
|
||||
|
||||
## How to configure and run
|
||||
|
||||
|
|
@ -16,6 +18,13 @@ Modify `.env`, and insert `thumbnail-server.yml` into `COMPOSE_FILE`:
|
|||
COMPOSE_FILE='seafile-server.yml,caddy.yml,thumbnail-server.yml'
|
||||
```
|
||||
|
||||
Add following configuration in `seahub_settings.py` to enable thumbnail for videos:
|
||||
|
||||
```py
|
||||
# video thumbnails (disabled by default)
|
||||
ENABLE_VIDEO_THUMBNAIL = True
|
||||
```
|
||||
|
||||
Finally, You can run thumbnail server with the following command:
|
||||
|
||||
```sh
|
||||
|
|
@ -51,10 +60,10 @@ Then modify the `.env` file according to your environment. The following fields
|
|||
| `S3_COMMIT_BUCKET` | S3 storage backend commit objects bucket |
|
||||
| `S3_FS_BUCKET` | S3 storage backend fs objects bucket |
|
||||
| `S3_BLOCK_BUCKET` | S3 storage backend block objects bucket |
|
||||
| `S3_KEY_ID` | S3 storage backend key ID |
|
||||
| `S3_SECRET_KEY` | S3 storage backend secret key |
|
||||
| `S3_AWS_REGION` | Region of your buckets |
|
||||
| `S3_HOST` | Host of your buckets |
|
||||
| `S3_KEY_ID` | S3 storage backend key ID |
|
||||
| `S3_SECRET_KEY` | S3 storage backend secret key |
|
||||
| `S3_AWS_REGION` | Region of your buckets |
|
||||
| `S3_HOST` | Host of your buckets |
|
||||
| `S3_USE_HTTPS` | Use HTTPS connections to S3 if enabled |
|
||||
| `S3_USE_V4_SIGNATURE` | Use the v4 protocol of S3 if enabled |
|
||||
| `S3_PATH_STYLE_REQUEST` | This option asks Seafile to use URLs like `https://192.168.1.123:8080/bucketname/object` to access objects. In *Amazon S3*, the default URL format is in virtual host style, such as `https://bucketname.s3.amazonaws.com/object`. But this style relies on advanced DNS server setup. So most self-hosted storage systems only implement the path style format. |
|
||||
|
|
@ -100,7 +109,7 @@ backend thumbnail_backend
|
|||
```
|
||||
|
||||
!!! warning "Thumbnail server has to access Seafile' storage"
|
||||
The thumbnail server needs to access Seafile storage.
|
||||
The thumbnail server needs to access Seafile storage.
|
||||
|
||||
- If you use local storage, you need to mount the `/opt/seafile-data` directory of the Seafile node to the thumbnail node, and set `SEAFILE_VOLUME` to the mounted directory correctly.
|
||||
|
||||
|
|
@ -108,6 +117,7 @@ backend thumbnail_backend
|
|||
|
||||
- If you are using multiple storage backends, you have to copy the `seafile.conf` of the Seafile node to the `/opt/seafile-data/seafile/conf` directory of the thumbnail node, and set `SEAF_SERVER_STORAGE_TYPE=multiple` in `.env`.
|
||||
|
||||
|
||||
## Thumbnail server directory structure
|
||||
|
||||
`/opt/seafile-data`
|
||||
|
|
|
|||
Loading…
Reference in New Issue