Thumbox v0.1.0 Thumbox View Source

Documentation for Thumbox.

Config

config :thumbox,
    server: "https://thumbor.example.com",
    # or just 'app' if thumbor can access it in the network
    origin: "my-app.com:4000",
    secret: "secret",
    types: %{
      big: "300x300/smart",
      small: "50x50/smart"
    }

Link to this section Summary

Functions

Generates an URL to the thumbor service

Signs a string like its done by thumbor see: http://thumbor.readthedocs.io/en/latest/libraries.html#library-tests-scenarios

Link to this section Functions

Link to this function gen_url(type, path, opts \\ []) View Source

Generates an URL to the thumbor service

Example

iex> Thumbox.gen_url(:small, "uploads/image.jpg", server: "http://thumbor:8000", origin: "app.com", secret: "secret", types: %{ small: "100x100" })
  "http://thumbor:8000/-fACxLAC_MbZ_JHxm0-tLYrHM2Y=/100x100/app.com/uploads/image.jpg"

Signs a string like its done by thumbor see: http://thumbor.readthedocs.io/en/latest/libraries.html#library-tests-scenarios