A thumbor server extension for DASH
Project description
thumbor_dash
A thumbor server extension for DASH
Setup
Requirements
- Python >= 3.9
- Pip >= 21.1
- Install thumbor_dash
pip install thumbor_dash
Note: thumbor_dash, thumbor, and other required dependencies will be installed
- Create a thumbor configuration file
thumbor-config > thumbor.conf
- Add these lines to
thumbor.conf
file
# Set allowed dimensions
MIN_WIDTH = 1
MIN_HEIGHT = 1
MAX_WIDTH = 1200
MAX_HEIGHT = 800
# Set security key
SECURITY_KEY = "0"
Usage
-
Start thumbor_dash server
thumbor_dash --conf=thumbor.conf
-
Sign image URL
thumbor_dash-url --key=<securityKey; must be "0"> --width=<width> --height=<height> --dashauth=<dashauth> --filters=<filters> <imageURL>
output:
/<signature>/<width>x<height>/dashauth:requester(<requesterId>):contract(<contractId>):document(<documentType>):field(<field>):owner(<ownerId>):updatedAt(<updatedAt>)/filters:format(<format>)/<encodedImageUrl>
-
Thumbor_dash image retrieval URL
http://<thumbor_dash-server>/<signature>/<width>x<height>/dashauth:requester(<requesterId>):contract(<contractId>):document(<documentType>):field(<field>):owner(<ownerId>):updatedAt(<updatedAt>)/filters:format(<format>)/<encodedImageUrl>
Note: If running the server locally, <thumbor_dash-server> should be
localhost:8888
Example
http://localhost:8888/Ai-ZyWWtJ0MHUQAm0GAlBTQMZ_Y=/1200x800/dashauth:requester(GCAFKUdw7PtUcDEG8j3sicMJ4ngx1aTqCdb4HD5n5WZ7):contract(En3GRoMNAnt69firp32h3NEBxyveLcHQMUbwhDW2UqoX):document(thumbnailField):field(avatarUrl):owner(GCAFKUdw7PtUcDEG8j3sicMJ4ngx1aTqCdb4HD5n5WZ7):updatedAt(1627076771396)/filters:format(jpeg)/https%3A//github.com/thumbor/thumbor/raw/master/example.jpg
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for thumbor_dash-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f1a897a22c2c1859f05aa79bb9398e61d423e83b0935189fa22e5fa8e8c8724 |
|
MD5 | 097e2135095649d94db5dd63726a8fef |
|
BLAKE2b-256 | 1f08f23dd9ff222aa3354c67f2e44b7242c252f6879b9cab0547e073fa0a39dc |