PHP code example of sebastiankennedy / laravel-flysystem-ali-cloud-oss
1. Go to this page and download the library: Download sebastiankennedy/laravel-flysystem-ali-cloud-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/ */
sebastiankennedy / laravel-flysystem-ali-cloud-oss example snippets
...
'disks' => [
'ali_cloud_oss' => [
'driver' => 'ali_cloud_oss',
'access_key_id' => env('ALI_CLOUD_OSS_ACCESS_KEY_ID'),
'access_key_secret' => env('ALI_CLOUD_OSS_ACCESS_KEY_SECRET'),
'endpoint' => env('ALI_CLOUD_OSS_ENDPOINT'),
'bucket' => env('ALI_CLOUD_OSS_BUCKET'),
],
],
...
...
$storage = \Storage->disk('ali_cloud_oss');
// 上传文件
$storage->uploadFile($object, $path);
...