Upload a file and save the link

My model is composed by some text fields and an image. In the database the image is not saved like a blob field but like a text field. So when I uploaded the file I want to store the file link.

I found a cookbook tutorial that explain how to upload an image http://www.yiiframew…doc/cookbook/2/ but I have some questions.

Where can i find the method saveAs ? How this method save the file? ( have I to pass only the folder path or the folder path plus the file name to store? )

So my problem is: I have to store the file, take the url where the file is stored and save it into the database.

Some hints?

Ok i make some tests and it’s ok :D i resolve myself my problems :P

Thank you anyway :)

ok to stay in topic. Yii offer something to autoresize the image?

No, Yii doesn’t offer this. You can use this extension: Kohana Image library

Infact i used it :D Thank you very much anyway :)

Can you give me some hints that how did you do that???

I am facing the same problem.

And how do you access the picture in your view page?