Path | Method | Scheme | Grant |
---|---|---|---|
/api/user/{userId}/storage/folders | POST | ANY | ALL |
/api/user/{userId}/storage/files | POST | ANY | ALL |
/api/user/{userId}/storage/files | GET | ANY | ALL |
/api/user/{userId}/storage/files | DELETE | ANY | ALL |
Path | Method | Scheme | Grant |
---|---|---|---|
/api/admin/user/{userId}/storage/files | GET | ANY | ALL |
/api/admin/user/{userId}/storage/files/{id} | GET | ANY | ALL |
Add docker machine IP to /etc/hosts:
127.0.0.1 storage.test
- PHP 7.4
- Lumen
- Redis
Name | Class |
---|---|
drop-box | \DropBoxAdapter::class |
aws | \AwsAdapter::class |
in-memory | \InMemoryAdapter::class |
file-storage | \FileStorageAdapter::class |
google-drive | \GoogleDriveAdapter::class |
If you did not find the adapter hat you need in the list, you can easy implement it yourself. To do this, you need to:
- create a file
/Infrastructure/Adapters/XXXAdapter.php
, where XXX it is the name of your new adapter XXXAdapter
should be inherit from the interfaceStorageInterface
For use your new adapter just update APP_ADAPTERS=XXX
key in .env
file.
Enjoy it!
You need to give a permission to storage dir:
sudo chmod -R 777 ./code/storage
PHP Quickstart - complete the steps described in the rest of this page to create a simple PHP command-line application that makes requests to the Drive API.
Create your Google Drive API keys. Here a detailed information on how to obtain your API ID, secret and refresh token:
You also need to give a permission to resource dir:
sudo chmod -R 777 ./code/resources
Getting Started with the AWS SDK for PHP - this guide shows you how to start building PHP applications on the Amazon Web Services platform with the AWS SDK for PHP.
You also need to to create a Bucket and make sure that your bucket is configured for clients to set a public-accessible ACL.
Community SDKs - the guide to implementation of Dropbox API.
To start working with the Dropbox API, you'll need an App. You can create a new app for the Dropbox API here
make pre-commit
Dykyi Roman, e-mail: [email protected]