Skip to content

Magomogo/barberry-service

Repository files navigation

barberry-service

Images hosting service on base of Barberry library. Serve as origin for a barberry-based service. Fork it if you need any project-specific features or different set of plugins.

The core project, documentation, list of plugins are available here: https://github.com/Magomogo/Barberry

Installation

composer.phar install
./check_dependencies.php

Uploading an image

Request

POST /
Content-Type: multipart/form-data;

... image ...

Response

HTTP/1.1 201 Created
Content-Type: application/json

{"id":"4feSq4","contentType":"image\/jpeg","ext":"jpg","length":323147,"filename":"original.jpg"}

Getting an image

To get an original image just request it by ID.

Request

GET /4feSq4

Response

HTTP/1.1 200 OK
Content-Type: image/jpeg

... original image ...

To resize and convert image request it by ID and extension.

Request

GET /4feSq4_100x100.gif HTTP/1.1

Response

HTTP/1.1 200 OK
Content-Type:image/gif

... resized image 100 x 100 ...

About

Images hosting service on base of Barberry library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages