All Projects → overtrue → laravel-filesystem-cos

overtrue / laravel-filesystem-cos

Licence: MIT license
Tencent Cloud COS storage for Laravel based on overtrue/flysystem-cos.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to laravel-filesystem-cos

qcloud-cos-client
Tencent COS Client
Stars: ✭ 35 (-37.5%)
Mutual labels:  tencent-cos, tencent-cloud, qcloud-cos
aliyun-oss-laravel
Laravel 的 Aliyun OSS 扩展, 支持 Laravel 9. Alibaba Cloud Object Storage Service For Laravel.
Stars: ✭ 91 (+62.5%)
Mutual labels:  flysystem-adapter, laravel-filesystem
flysystem-cos
💾 Flysystem adapter for the Qcloud COS storage.
Stars: ✭ 57 (+1.79%)
Mutual labels:  flysystem-adapter, qcloud-cos
cos-go-sdk-v5
Tencent cloud object storage service client 5.0 xml version __腾讯cos-go-sdk-v5__
Stars: ✭ 34 (-39.29%)
Mutual labels:  cos
cos-ftp-server-V5
腾讯云对象存储(COS-V5)的FTP Server
Stars: ✭ 35 (-37.5%)
Mutual labels:  cos
cos-guidelines
Caché ObjectScript contibutors guidelines
Stars: ✭ 15 (-73.21%)
Mutual labels:  cos
flysystem-memory
Flysystem Memory Adapter
Stars: ✭ 62 (+10.71%)
Mutual labels:  flysystem-adapter
Upic
📤uPic is a native, powerful, beautiful and simple picture and file upload tool for macOS.
Stars: ✭ 2,465 (+4301.79%)
Mutual labels:  tencent-cos
bc
some useful math functions for linux calculator bc
Stars: ✭ 18 (-67.86%)
Mutual labels:  cos
e5-api-renew-scf
本项目已进入半废弃状态(因为我自己的开发者订阅在2020年12月掉了)所以这里可能只能提供基础技术指导——[腾讯云函数专用]通过重复调用MS Graph API来试图续订Office 365开发者试用
Stars: ✭ 39 (-30.36%)
Mutual labels:  tencent-cloud
flysystem-azure-blob-storage
No description or website provided.
Stars: ✭ 52 (-7.14%)
Mutual labels:  flysystem-adapter
gulp-upload-qcloud
腾讯云 cos 静态资源上传 gulp 插件
Stars: ✭ 18 (-67.86%)
Mutual labels:  cos
qcloud-upload
基于 nodejs 腾讯云 cos 静态资源上传插件
Stars: ✭ 14 (-75%)
Mutual labels:  cos
js
serverless your express/koa/restify apps
Stars: ✭ 21 (-62.5%)
Mutual labels:  tencent-cloud
cossync
腾讯云COS同步(批量上传)工具
Stars: ✭ 23 (-58.93%)
Mutual labels:  cos
file-upload
koa2 middleware support upload to cos/oss/obs/aws/local
Stars: ✭ 28 (-50%)
Mutual labels:  cos
Picgo
🚀A simple & beautiful tool for pictures uploading built by vue-cli-electron-builder
Stars: ✭ 15,358 (+27325%)
Mutual labels:  tencent-cos
tencent-cam-policy
Easily create an Tencent CAM Policy with Serverless Components
Stars: ✭ 20 (-64.29%)
Mutual labels:  tencent-cloud
flutter superplayer
适用于 Flutter 的腾讯云超级播放器插件
Stars: ✭ 13 (-76.79%)
Mutual labels:  tencent-cloud
CloudMinecraft
Create a minecraft server with TencentCloud API when the worlds are saved in another Student's Cloud.
Stars: ✭ 11 (-80.36%)
Mutual labels:  tencent-cloud

Laravel filesystem COS

Laravel Octane Ready Status GitHub release (latest SemVer) GitHub License Packagist Downloads

Tencent Cloud COS storage for Laravel based on overtrue/flysystem-cos.

Sponsor me

Requirement

  • Laravel >= 9.0

Installation

$ composer require "overtrue/laravel-filesystem-cos" -vvv

Configuration

  1. Add a new disk to your config/filesystems.php config:
<?php

return [
   'disks' => [
       //...
       'cos' => [
           'driver' => 'cos',

            'app_id'     => env('COS_APP_ID'),
            'secret_id'  => env('COS_SECRET_ID'),
            'secret_key' => env('COS_SECRET_KEY'),
            'region'     => env('COS_REGION', 'ap-guangzhou'),

            'bucket'     => env('COS_BUCKET'),  // 不带数字 app_id 后缀
           
            // 可选,如果 bucket 为私有访问请打开此项
            'signed_url' => false,

            // 可选,是否使用 https,默认 false
            'use_https' => true, 

            // 可选,自定义域名
            'domain' => 'emample-12340000.cos.test.com', 

            // 可选,使用 CDN 域名时指定生成的 URL host
            'cdn' => env('COS_CDN'),

            'prefix' => env('COS_PATH_PREFIX'), // 全局路径前缀

            'guzzle' => [
                'timeout' => env('COS_TIMEOUT', 60),
                'connect_timeout' => env('COS_CONNECT_TIMEOUT', 60),
            ],
       ],
       //...
    ]
];

🚨 请注意:example-1230000001.cos.ap-guangzhou.mycloud.com

其中:bucket: example, app_id: 1230000001, region: ap-guangzhou

Usage

$disk = Storage::disk('cos');

// create a file
$disk->put('avatars/filename.jpg', $fileContents);

// check if a file exists
$exists = $disk->has('file.jpg');

// get timestamp
$time = $disk->lastModified('file1.jpg');
$time = $disk->getTimestamp('file1.jpg');

// copy a file
$disk->copy('old/file1.jpg', 'new/file1.jpg');

// move a file
$disk->move('old/file1.jpg', 'new/file1.jpg');

// get file contents
$contents = $disk->read('folder/my_file.txt');

Full API documentation.

❤️ Sponsor me

Sponsor me

如果你喜欢我的项目并想支持它,点击这里 ❤️

Project supported by JetBrains

Many thanks to Jetbrains for kindly providing a license for me to work on this and other open-source projects.

PHP 扩展包开发

想知道如何从零开始构建 PHP 扩展包?

请关注我的实战课程,我会在此课程中分享一些扩展开发经验 —— 《PHP 扩展包实战教程 - 从入门到发布》

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].