overtrue / Laravel Filesystem Qiniu
A Qiniu Storage filesystem for Laravel
Stars: ✭ 437
Projects that are alternatives of or similar to Laravel Filesystem Qiniu
aliyun-oss-laravel
Laravel 的 Aliyun OSS 扩展, 支持 Laravel 9. Alibaba Cloud Object Storage Service For Laravel.
Stars: ✭ 91 (-79.18%)
Mutual labels: filesystem, laravel-package
Laravel Server Monitor
Server Monitoring Command for Laravel Applications
Stars: ✭ 424 (-2.97%)
Mutual labels: laravel-package
Infinit
The Infinit policy-based software-defined storage platform.
Stars: ✭ 363 (-16.93%)
Mutual labels: filesystem
Goofys
a high-performance, POSIX-ish Amazon S3 file system written in Go
Stars: ✭ 3,932 (+799.77%)
Mutual labels: filesystem
Discutils
Utility libraries to interact with discs, filesystem formats and more
Stars: ✭ 417 (-4.58%)
Mutual labels: filesystem
Filesystem
The Filesystem component provides basic utilities for the filesystem.
Stars: ✭ 4,111 (+840.73%)
Mutual labels: filesystem
Dokany
User mode file system library for windows with FUSE Wrapper
Stars: ✭ 4,055 (+827.92%)
Mutual labels: filesystem
Fssb
A filesystem sandbox for Linux using syscall intercepts.
Stars: ✭ 375 (-14.19%)
Mutual labels: filesystem
Io
Dataset, streaming, and file system extensions maintained by TensorFlow SIG-IO
Stars: ✭ 427 (-2.29%)
Mutual labels: filesystem
Fwanalyzer
a tool to analyze filesystem images for security
Stars: ✭ 382 (-12.59%)
Mutual labels: filesystem
Eloquent Viewable
Associate views with Eloquent models in Laravel
Stars: ✭ 404 (-7.55%)
Mutual labels: laravel-package
Google Drive Ocamlfuse
FUSE filesystem over Google Drive
Stars: ✭ 4,447 (+917.62%)
Mutual labels: filesystem
Laravel filesystem Qiniu
Qiniu storage for Laravel based on overtrue/flysystem-qiniu.
Requirement
- PHP >= 5.5.9
Installation
$ composer require "overtrue/laravel-filesystem-qiniu" -vvv
Configuration
- After installing the library, register the
Overtrue\LaravelFilesystem\Qiniu\QiniuStorageServiceProvider
in yourconfig/app.php
file:
'providers' => [
// Other service providers...
Overtrue\LaravelFilesystem\Qiniu\QiniuStorageServiceProvider::class,
],
- Add a new disk to your
config/filesystems.php
config:
<?php
return [
'disks' => [
//...
'qiniu' => [
'driver' => 'qiniu',
'access_key' => env('QINIU_ACCESS_KEY', 'xxxxxxxxxxxxxxxx'),
'secret_key' => env('QINIU_SECRET_KEY', 'xxxxxxxxxxxxxxxx'),
'bucket' => env('QINIU_BUCKET', 'test'),
'domain' => env('QINIU_DOMAIN', 'xxx.clouddn.com'), // or host: https://xxxx.clouddn.com
],
//...
]
];
Usage
$disk = Storage::disk('qiniu');
// 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');
// fetch url content
$file = $disk->fetch('folder/save_as.txt', $fromUrl);
// get file url
$url = $disk->getUrl('folder/my_file.txt');
// get file upload token
$token = $disk->getUploadToken('folder/my_file.txt');
$token = $disk->getUploadToken('folder/my_file.txt', 3600);
// get private url
$url = $disk->privateDownloadUrl('folder/my_file.txt');
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].