1
0
mirror of https://github.com/enpaul/kodak.git synced 2025-06-03 21:33:25 +00:00
Ethan Paul a87ca3bc80
Update manip endpoint to fix path problem
One of the goals is to make the generated content directory directly hostable
via a web browser for performance. This means that the application needs to be
able to generate a file tree identical to the URL structure so that clients can
fetch a single URL and either use the cached image or trigger a manipulation
depending on whether it already exists.

With a url structure of /key and /key/manip for the source and manips respectively,
it becomes impossible to create a file tree matching it since 'key' must be both
the source file and a directory containing the manipulated images.

This updates it to use 'original' as a special manip name so the URL structure of
/key/original and /key/manip can match the directory structure
2021-11-23 00:23:08 -05:00
2021-10-30 11:51:41 -04:00
2020-09-16 03:41:53 -04:00
2021-10-28 19:03:39 -04:00
2021-10-28 23:17:00 -04:00
2021-11-13 00:56:07 -05:00
2021-10-28 23:17:00 -04:00
2021-10-30 11:51:41 -04:00

kodak

HTTP server for handling image uploads and thumbnail generation.

This project requires Poetry 1.0+

Implementation goals

Support token based authentication:

POST /auth/token

GET /img/abcdefg.jpg?token=XYZ

Support dynamic resolution generation:

GET /img/abcdefg/100x50.jpg

Support server-side aliasing of resolutions to names:

GET /img/abcdefg/foobar.jpg  # translates to something like 120x90

Support parameter-based selection of scaling method:

# "absolute scale horizontal", "relative scale vertical"
GET /img/abcdefg/200x100.jpg?h=abs&v=rel

Support both sqlite and maria storage backend

Support redis caching to relieve file system strain

Support autocleaning of cached file system files to reduce directory size

Support

Description
Languages
Python 94.5%
Makefile 2.8%
Dockerfile 2.7%