Yii 1.1: upload

upload extesion with image handle
15 followers

This extension is a wrapper of verot.net upload class.

With this class you can handle your upload and make some image changes, like resize, legend, watermark, effects, crop and more.

Resources

Documentation

Requirements

  • Yii 1.0 or above

Installation

  • Extract the release file under protected/extensions

Usage

See the forum topic:

http://www.yiiframework.com/forum/index.php?/topic/7030-upload-verot

Change Log

February 1, 2010

  • Initial release.

Total 4 comments

#16163 report it
bhawin at 2014/01/24 03:37am
upload is not processing
                   $upload=new Upload($_FILES["image".$i]);
                    $path=Yii::app()->request->baseUrl."/protected/images/" ;
                    try{
                        if($upload->uploaded)
                        {
                            $upload->process($path);
                        }
                        else
                        {
                            echo(" file not uploaded ");
                        }
                        if($upload->processed) {
                            $destName[$i] = $upload->file_dst_name;
                        }
                        else
                        {
                            echo("upload not processed");
                            die;
                        }
                    }
                    catch (Exception $excp)
                    {
                        echo($excp);
                    }
#12960 report it
Shahcheraghean at 2013/04/23 12:24pm
saving the file

Thank you for your extension. how to save the file address and name in the database by model? and where to import this extension? in the config file or anywhere elss?

#2975 report it
tydeas_dr at 2011/03/04 02:49pm
Works just fine

I was using the extension

$file = new Upload($_FILES["foo"]);
if($file->uploaded) {
    $file->file_new_name_body = "bar";
    var_dump($file->file_new_name_body);
    $file->process("../path/");
    var_dump($file->file_new_name_body);
 
 
Results in:
string(3) { "bar" }
string(0) { "" }

After opening the Upload.php and realized it was 4159 lines (with doc). I found $file->file_dst_name and other attributes to get what i want. The file had pretty much documenation, no need to read... just a fine extension to do the work.

#36 report it
Sasha at 2010/10/07 05:28am
good work

Nice extenstion, thank you

Leave a comment

Please to leave your comment.

Create extension