massimo-me / raspberry-image-cdn

[Unmantained] Simple raspberry image cdn ⚡️

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#Raspberry image cdn upload

Clone repository:

git clone https://github.com/ChiarilloMassimo/raspberry-image-cdn.git

Install dependencies:

composer install

Run:

php -S localhost:8080 web/app.php

If you have an external hd * optional

ln -s /media/{HD}/cdn/cache/images cache/images

ln -s /media/{HD}/cdn/shared/images shared/images

###Upload image from url:

http://localhost:8080/upload?url=https://symfony.com/images/v5/conferences/symfony-con-berlin-2016-mascot.png

If success return

{file: "/symfony-con-berlin-2016-mascot"}

####View image

http://localhost:8080/{file}

Example:

[http://localhost:8080/symfony-con-berlin-2016-mascot](View original)

symfony-con-berlin-2016-mascot

###Zoom image

####Custom width and height http://localhost:8080/w_{width},h_{height}/{file}

Example:

[http://localhost:8080/w_50,h_50/symfony-con-berlin-2016-mascot](Custom width and height)

symfony-con-berlin-2016-mascot 1

####Custom height http://localhost:8080/h_{height}/{file}

Example:

[http://localhost:8080/h_200/symfony-con-berlin-2016-mascot](Custom width and height)

symfony-con-berlin-2016-mascot 2

####Custom width http://localhost:8080/w_{width}/{file}

Example:

[http://localhost:8080/w_200/symfony-con-berlin-2016-mascot](Custom width and height)

symfony-con-berlin-2016-mascot 3


Do not use in production

There are no tests, and the code is written in a short time

About

[Unmantained] Simple raspberry image cdn ⚡️


Languages

Language:PHP 100.0%