GithubHelp home page GithubHelp logo

rwd / unguis Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 58 KB

Sinatra app to serve thumbnails for web resources in Europeana

License: European Union Public License 1.1

Ruby 100.00%
code4lib europeana thumbnails ruby sinatra

unguis's Introduction

Unguis

Build Status Coverage Status security Dependency Status Code Climate

Sinatra app to serve thumbnails for web resources in Europeana

Configuration

Thumbnails are expected to be stored in an Amazon S3 bucket.

This app uses the AWS SDK to connect to S3. You will need to configure in environment variables:

  • AWS_REGION: region of the S3 bucket
  • AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY: AWS credentials for read access to objects in the bucket
  • AMAZON_S3_BUCKET: name of the bucket

Usage

Start the app using Puma: bundle exec puma -C config/puma.rb

Given your app is running on thumbs.example.com, and a web resource with URI http://provider.example.com/object/123.png, request a thumbnail at: http://thumbs.example.com/?uri=http%3A%2F%2Fprovider.example.com%2Fobject%2F123.png

Response strategies

By default, Unguis will serve thumbnails in the HTTP response it sends to clients itself.

Alternatively, it can be configured to respond with HTTP redirects to S3, by setting the environment variable RESPOND_WITH_REDIRECTS=1.

Caching thumbnails

Response headers include ETag and Last-Modified, facilitating client-side caching of thumbnails.

License

Licensed under the EUPL V.1.1.

For full details, see LICENSE.md.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.