udhuong/laravel-upload-file
Composer 安装命令:
composer require udhuong/laravel-upload-file
包简介
Package for upload file
README 文档
README
Laravel-Upload-File is a package for uploading files with Laravel.
Features
- Filesystem-driven approach is easily configurable to allow any number of upload directories with different accessibility. Easily restrict uploads by MIME type, extension and/or aggregate type (e.g.
imagefor JPEG, PNG or GIF).
Example Usage
Upload a file to the server, and place it in a directory on the filesystem disk named "uploads". This will create a Media record that can be used to refer to the file.
$file = LaravelUploadFile::fromSource($request->file('images')) ->toDestination('s3', 'uploads') ->upload();
Installation
Add the package to your Laravel app using composer
composer require udhuong/laravel-upload-file
Register the package's service provider in config/app.php. In Laravel versions 5.5 and beyond, this step can be skipped if package auto-discovery is enabled.
'providers' => [ ... Udhuong\LaravelUploadFile\UploadFileServiceProvider::class, ... ];
The package comes with a Facade for the image uploader, which you can optionally register as well. In Laravel versions 5.5 and beyond, this step can be skipped if package auto-discovery is enabled.
'aliases' => [ ... 'FileUploader' => Plank\Mediable\FileUploader::class, ... ]
Publish the config file (config/mediable.php) of the package using artisan.
php artisan vendor:publish --provider="Udhuong\LaravelUploadFile\UploadFileServiceProvider"
Documentation
Updating...
License
This package is released under the MIT license (MIT).
About package
Package developed based on laravel-mediable of plank/laravel-mediable
About author
Plank is a web development agency based in Hanoi, Vietnam.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-07-13