This ext for upyun.Upyun is a distributed image processing.I deal it for yii.
Requirements ¶
No limit
Installing and configuring ¶
- Download and extract to extension folder.
- install this extension in config/main.php
Basic Set
......
'file'=>array(
'class'=>'application.extensions.upyun.FileUpload',
'bucketname'=>'',
'username'=>'',
'password'=>'',
),
.......
Advance Set
...............
'file'=>array(
'class'=>'application.extensions.upyun.FileUpload',
'bucketname'=>'',
'username'=>'',
'password'=>'',
'opts'=>array(
'X_GMKERL_TYPE' => 'square', // type for the thumb
'X_GMKERL_VALUE'=> 100, // size for the thumb
'X_GMKERL_QUALITY' => 95, // quality for the thumb
'X_GMKERL_UNSHARP' => True //whether to Sharpening
)
................
Usage ¶
$fileContent = file_ge_contents($file);
$pic = Yii::app()->file->uploadFileByContent($fileContent,$newFilename,$newFileExt);
if(!isset($pic['error'])){
$path = $pic['path'];
$url = Yii::app()->file->getFileUrl($path,'!w588');
}else{
//TODO
}
Resources ¶
- [Project page](URL to your project page)
- Try out a demo
This web in English
So I suggest you translate the text into English for the benefit of users who are not fluent in Chinese...
@#13887
i think the upyun just for china first , i will translate the text into English recently.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.