This package provides a filesystem adapter for Laravel that allows you to use an HTTP API as a filesystem.
You can install the package via composer:
composer require flowan/laravel-filesystem-http
Put the following in your config/filesystems.php
file:
<?php
return [
'disks' => [
// ...
'warehouse' => [
'driver' => 'http',
'token' => env('WAREHOUSE_TOKEN'),
'url' => env('WAREHOUSE_URL'),
'public_url' => env('WAREHOUSE_PUBLIC_URL', env('WAREHOUSE_URL')),
'bucket' => env('WAREHOUSE_BUCKET'),
'include_bucket_prefix_in_url' => env('WAREHOUSE_INCLUDE_BUCKET_PREFIX_IN_URL', true),
'include_bucket_in_url' => env('WAREHOUSE_INCLUDE_BUCKET_IN_URL', true),
'throw' => false,
],
],
];
And add the following to your .env
file:
WAREHOUSE_TOKEN=your-token
WAREHOUSE_URL=https://cdn.example.com
composer test
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.
- Implement
readStream
andwriteStream
methods. - Implement
setVisibility
method.