PHP code example of maxlcoder / laravel-oss

1. Go to this page and download the library: Download maxlcoder/laravel-oss 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/ */

    

maxlcoder / laravel-oss example snippets


return [
    'endpoint_upload' => env('OSS_ENDPOINT_UPLOAD'),
    'endpoint' => env('OSS_ENDPOINT'),
    'access_key' => env('OSS_ACCESS_KEY'),
    'secret_key' => env('OSS_SECRET_KEY'),
    'bucket' => env('OSS_BUCKET'),
    'path' => env('OSS_PATH', '')
];


public function signUpload($dir = '', $maxSize = 1048576000){ ... }

return [
    'access_id' => $accessKeyId,
    'host' => $host,
    'policy' => $base64Policy,
    'signature' => $signature,
    'dir' => $dir,
];