upyun the extensions of upyun for yii

  1. Requirements
  2. Installing and configuring
  3. Usage
  4. Resources

This ext for upyun.Upyun is a distributed image processing.I deal it for yii.

Requirements

No limit

Installing and configuring

  1. Download and extract to extension folder.
  2. 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

0 0
2 followers
449 downloads
Yii Version: Unknown
License: BSD-2-Clause
Category: File System
Developed by: Y.Fan
Created on: Jul 4, 2013
Last updated: 11 years ago

Downloads

show all