Package: thumbor-dash
thumbor_dashA thumbor server extension for DASHSetupRequirementsPython >= 3.9Pip >= 21.1Thumbor == 7.0.0a5See the requirements for setting upthumborin thedocumentation1. Install thumbor_dashpip install thumbor_dashNote: thumbor_dash, thumbor, and other required dependencies will be installed2. Create a thumbor configuration filethumbor-config > thumbor.conf3. Add these lines tothumbor.conffile# Set allowed dimensionsMIN_WIDTH=1MIN_HEIGHT=1MAX_WIDTH=1200MAX_HEIGHT=800# Use custom Url signing method (sha256)URL_SIGNER='thumbor_dash.url_signers.base64_hmac_sha256'# Allow only signed URLALLOW_UNSAFE_URL=False# Set user moderation rulesREQUEST_TIME_LIMIT=1# time between requests in minutesUSAGE_VIOLATION_LIMIT=5# total number of times a requester can violate the time limit before banBAN_DURATION=10# requester ban duration in minutes# Use custom error handlingUSE_CUSTOM_ERROR_HANDLING=TrueERROR_HANDLER_MODULE='thumbor_dash.error_handlers.sentry'# User-defined MN and IP listSEED_IP='seed-1.testnet.networks.dash.org'MN_LIST='34.219.81.129,34.221.42.205,34.208.88.128,54.189.162.193,34.220.124.90,54.201.242.241,54.68.10.46,34.210.81.39,18.237.47.243'Usage1. Start thumbor_dash serverthumbor_dash --conf=thumbor.conf2. Sign image URLthumbor_dash-url--key="<Requester Identity Key>"--width=<width>--height=<height>--dashauth="requester(<requesterId>):contract(<contractId>):document(<documentType>):field(<avatarUrl>):owner(<ownerId>):updatedAt(<updatedAt>)"--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>3. Thumbor_dash image retrieval URLhttp://<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 belocalhost:8888ExampleThis is a signedthumbor_dash url. Simply runthumbor_dashand paste this link in your browser.http://localhost:8888/U6lnOyBbSbRmZoxIgj81unAoR-V2GhJj1lAAQ0846Nw=/1200x800/dashauth:requester(856aSH6uEBaHpndZYXDk72NJbZqXokNSPGrs8nKbd7QL):contract(DbBHu3Ct1zD1AYAiw58V7QXT22B3k7qRLDLfaXqiRQp5):document(thumbnailField):field(avatarUrl):owner(856aSH6uEBaHpndZYXDk72NJbZqXokNSPGrs8nKbd7QL):updatedAt(1654864287788)/filters:format(jpeg)/https%3A//github.com/thumbor/thumbor/raw/master/example.jpgRunning thumbor_dash in DockerThis is the fastest way to runthumbor_dash1. Create athumbor.env.txtfile containing the environment variablesMIN_WIDTH=1MIN_HEIGHT=1MAX_WIDTH=1200MAX_HEIGHT=800REQUEST_TIME_LIMIT=1USAGE_VIOLATION_LIMIT=5BAN_DURATION=10USE_CUSTOM_ERROR_HANDLING=TrueALLOW_UNSAFE_URL=FalseURL_SIGNER=thumbor_dash.url_signers.base64_hmac_sha256ERROR_HANDLER_MODULE=thumbor_dash.error_handlers.sentrySEED_IP=seed-1.testnet.networks.dash.orgMN_LIST=34.219.81.129,34.221.42.205,34.208.88.128,54.189.162.193,34.220.124.90,54.201.242.241,54.68.10.46,34.210.81.39,18.237.47.2432. Start thumbor_dash server in Dockerdocker run -p 80:80 --env-file thumbor.env.txt mayoreee/thumbor_dashWhen your environment is not ARM-based, add the option--platform linux/arm64/v8Note: If running in Docker,<thumbor_dash-server>in the image request URL should be set tolocalhost:80instead oflocalhost:8888.