PHP code example of zenithsu / cloud-uploader

1. Go to this page and download the library: Download zenithsu/cloud-uploader 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/ */

    

zenithsu / cloud-uploader example snippets


use Zenith\CloudUploader\Configs\ALiYunConfig;
use Zenith\CloudUploader\Exceptions\NotSupportedCloudException;
use Zenith\CloudUploader\Uploader;
use Zenith\CloudUploader\Utils\FilenameGenerator;

rtedCloudException $e) {
    die('Not Supported Cloud');
}
$filename = (new FilenameGenerator())->uuid('putObject.txt');
$url = $uploader->put('zenith-he-storage-dev', $filename, 'tests/putObject.txt');
var_dump($url);