PHP code example of chialab / cakephp-object-storage

1. Go to this page and download the library: Download chialab/cakephp-object-storage library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

chialab / cakephp-object-storage example snippets


    public function bootstrap(): void
    {
        // ...

        $this->addPlugin('Chialab/CakeObjectStorage');

        // ...
    }

    // ...

    'Storage' => [
        'className' => FilesystemAdapter::class,
        'args' => [
            WWW_ROOT . 'files' . DS,
            TMP . 'incomplete-uploads' . DS,
            '/files/',
            0007,
        ],
    ],

    // ...
shell
composer install aws/aws-sdk-php

POST /files/{file_id}/upload

POST /files/{file_id}/upload?part=1

DELETE /files/{file_id}/abort