Download the PHP package eposgit/yii2-hejiang-storage without Composer
On this page you can find all versions of the php package eposgit/yii2-hejiang-storage. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eposgit/yii2-hejiang-storage
More information about eposgit/yii2-hejiang-storage
Files in eposgit/yii2-hejiang-storage
Package yii2-hejiang-storage
Short Description A file uploading extension for Yii2, saving files to object storage service.
License
Informations about the package yii2-hejiang-storage
Hejiang Storage
Thanks for your attention. This package is only used for my company projects, please do NOT use it in your product environment.
Usage
-
Firstly, add this lines of code to your Yii application config:
-
Then after app bootstarpping, you would get the storage component instance like that:
Alternatively, you can also create a driver while app running:
-
Fetch uploaded file by field name:
-
Save it.
$url
will be a URL string which can access this file on success, orfalse
on failure.If there's any error occurred, these methods will throw a
Hejiang\Storage\Exceptions\StorageException
. Don't forget totry... catch ...
.
About
Working at: Zhejiang Hejiang Technology Co., Ltd.
All versions of yii2-hejiang-storage with dependencies
yiisoft/yii2 Version ~2.0.5
qiniu/php-sdk Version ^7.2
aliyuncs/oss-sdk-php Version ^2.3
qcloud/cos-sdk-v5 Version ^1.0