imagereductor

module
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2020 License: MIT

README

Build Status GitHub release go.dev reference Test Coverage Go Report Card MIT License

imagereductor

Image delivery from storage of AWS S3 / GCS contents with Resizing and Caching

URL Query Key to Resize

  • key : path of storage
  • w : 500 (px)
  • h : 500 (px)
  • q : 1~4
  • rotate : right,left,upsidedown
  • crop : 111,222,333,444 (from point x/y - to point x/y)
  • nonusecache: true

Form Key to Upload(multipart/form-data)

  • path : path of storage
  • uploadfile : filepath

using docker

env param
VERIFY_MODE enable / disable
LOG_MODE minimum / few or empty
ADMIN_MODE enable / disable
SERVER_PORT 8080, 80, etc
TOKENAPI_ALLOW_IPS 72.22.0.1/24,127.0.0.1/32(separate with comma)
CACHE_TYPE redis / gocache
REDISHOST x.x.x.x
REDISPORT 6379
REDISTLS use or empty
REDISPASSWORD
CACHEDDB 0~
CACHEEXPIED 300 (seconds)
HEADEREXPIRED 300 (seconds)
STORAGE_TYPE s3 / gcs
AWS_S3_LOCALUSE use or empty (use with minio)
AWS_S3_REGION
AWS_S3_BUKET
AWS_S3_ACCESSKEY
AWS_S3_SECRETKEY
AWS_S3_ENDPOINT (use with minio)
GCS_BUKET
GCS_PROJECTID
GOOGLE_APPLICATION_CREDENTIALS
TOKEN_SECRET (use with jwt token when upload images)
VALIDATE_IMAGE_TYPE jpeg,gif,png,bmp,tiff
VALIDATE_IMAGE_MAXWIDTH 5000 (px)
VALIDATE_IMAGE_MAXHEIGHT 5000 (px)
VALIDATE_IMAGE_MAXFILESIZE 104857600 (byte)

Directories

Path Synopsis
application
domain
infrastructure
interfaces
library

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL