Looking to hire Laravel developers? Try LaraJobs

image-server-laravel-adapter maintained by spacened

Description
A Laravel package to integrate a custom image server filesystem driver
Last update
2024/11/21 20:47 (dev-main)
Links
Downloads
2

Comments
comments powered by Disqus

ImageServer

Latest Version on Packagist Total Downloads Build Status StyleCI

Image Server Adapter for Laravel

This package integrates a custom filesystem driver for storing images on a remote image server.

Installation

  1. Via Composer
composer require spacened/image-server

Usage

  1. Add the service provider to your config/app.php (if not using auto-discovery):
YourNamespace\Providers\ImageServerServiceProvider::class,

Configure the disk in config/filesystems.php:

'image_server' => [
    'driver' => 'image_server',
    'url' => env('IMAGE_SERVER_URL') . '/img',
    'endpoint' => env('IMAGE_SERVER_URL') . '/api/v1/upload',
    'api_key' => env('IMAGE_SERVER_API_KEY'),
    'project_id' => env('IMAGE_SERVER_PROJECT_ID')
],
  1. Add the IMAGE_SERVER_URL, IMAGE_SERVER_API_KEY and IMAGE_SERVER_PROJECT_ID in your .env file

  2. Use it in your application:

$file = $request->file('image')->store('/', 'image_server');

Change log

Please see the changelog for more information on what has changed recently.

Testing

composer test

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author@email.com instead of using the issue tracker.

Credits

License

MIT. Please see the license file for more information.