Download the PHP package ftm-pm/media-server without Composer
On this page you can find all versions of the php package ftm-pm/media-server. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ftm-pm/media-server
More information about ftm-pm/media-server
Files in ftm-pm/media-server
Package media-server
Short Description MediaServer is a micro application that receives an image file with filters and returns the path to this image and a collection of images with applied filters.
License MIT
Informations about the package media-server
MediaServer
The MediaServer is a micro application that receives an image file with filters(or simple file) and returns the path to this image and a collection of images with applied filters (or path for simple file).
Russian documentation here.
Setup
The MediaServer is a symfony/skeleton application with packages for uploading and cropping images. Some bundles:
- VichUploaderBundle - uploading images
- LiipImagineBundle - creating preview images
- LexikJWTAuthenticationBundle - authorization JWT
- All bundles
Installation
Run the Composer command to create a new project
Configuration
After installing, you need to set environment variables. You can see variables in the .env file.
Next step, run command to update database.
In MediaServer, authorization was developed using JWT. You can see documentation here.
For create a new user, you can use any REST client. You should send a new request to http://my-project/api/register with parameters:
or using curl
After the confirmation email, get token. Send a new request to http://my-project/api/token:
or using curl
The MediaServer API returns two fields:
For authorization, you must to send header for any request: Authorization: Bearer your_token.
Use
The MediaServer API can create(load, crop...) and remove images.
curl -X POST http://my-project/api/images ...
- to create
curl -X DELETE http://my-project/api/images/id ...
- to delete by id
Simple loading
For create a new image, you can send a new post request with parameter imageFile
:
The MediaServer API returns one field with the path to the source image:
Create preview
You can create a different preview for image using LiipImagineBundle. In the api, the previews
parameter is an array consisting of LiipImagineBundle
filter configurations.
For example, creating a small
preview:
The MediaServer API returns the path to the source image, as well as a previews collection:
Download simple file
For create a new document, you can send a new post request with parameter documentFile
:
The MediaServer API returns the path to the source document:
It's the symfony 4 skeleton with the following bundles:
- ext-iconv
- gesdinet/jwt-refresh-token-bundle
- gfreeau/get-jwt-bundle
- guzzlehttp/guzzle
- lexik/jwt-authentication-bundle
- liip/imagine-bundle
- nelmio/cors-bundle
- sensio/framework-extra-bundle
- symfony/console
- symfony/flex
- symfony/form
- symfony/framework-bundle,
- symfony/lts
- symfony/maker-bundle
- symfony/orm-pack
- symfony/security-bundle,
- symfony/swiftmailer-bundle
- symfony/twig-bundle
- symfony/validator
- symfony/yaml
- vich/uploader-bundle
Feedback
- Create a new issue
- Ask a question on сайте.
- Send a message to [email protected]
License MIT.
All versions of media-server with dependencies
ext-iconv Version *
gesdinet/jwt-refresh-token-bundle Version ^0.3.2
gfreeau/get-jwt-bundle Version ^2.0
guzzlehttp/guzzle Version ^6.3
lexik/jwt-authentication-bundle Version ^2.4
liip/imagine-bundle Version 2.0.x-dev
nelmio/cors-bundle Version ^1.5
sensio/framework-extra-bundle Version ^5.1
symfony/console Version ^4.0
symfony/flex Version ^1.0
symfony/form Version ^4.0
symfony/framework-bundle Version ^4.0
symfony/lts Version ^4@dev
symfony/maker-bundle Version ^1.0
symfony/monolog-bundle Version ^3.2
symfony/orm-pack Version ^1.0
symfony/security-bundle Version ^4.0
symfony/serializer Version ^4.0
symfony/swiftmailer-bundle Version ^3.2
symfony/twig-bundle Version ^4.0
symfony/validator Version ^4.0
symfony/yaml Version ^4.0
vich/uploader-bundle Version ^1.7