All Projects → overtrue → Laravel Filesystem Qiniu

overtrue / Laravel Filesystem Qiniu

A Qiniu Storage filesystem for Laravel

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
Catfs
Cache AnyThing filesystem written in Rust
Stars: ✭ 404 (-7.55%)
Mutual labels:  filesystem
Svfs
The Swift Virtual File System
Stars: ✭ 375 (-14.19%)
Mutual labels:  filesystem
Electron Filesystem
FileSystem for windows
Stars: ✭ 409 (-6.41%)
Mutual labels:  filesystem
Goofys
a high-performance, POSIX-ish Amazon S3 file system written in Go
Stars: ✭ 3,932 (+799.77%)
Mutual labels:  filesystem
Statamic
Statamic 3: The New Site/App Package
Stars: ✭ 431 (-1.37%)
Mutual labels:  laravel-package
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
Filer
Node-like file system for browsers
Stars: ✭ 389 (-10.98%)
Mutual labels:  filesystem
Dokany
User mode file system library for windows with FUSE Wrapper
Stars: ✭ 4,055 (+827.92%)
Mutual labels:  filesystem
Rm Protection
A safe alternative for "rm".
Stars: ✭ 416 (-4.81%)
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
Mango
mango fun framework
Stars: ✭ 343 (-21.51%)
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
Sharp
Laravel 6+ Content management framework
Stars: ✭ 430 (-1.6%)
Mutual labels:  laravel-package

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

  1. After installing the library, register the Overtrue\LaravelFilesystem\Qiniu\QiniuStorageServiceProvider in your config/app.php file:
'providers' => [
    // Other service providers...
    Overtrue\LaravelFilesystem\Qiniu\QiniuStorageServiceProvider::class,
],
  1. 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');

Full API documentation.

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].