Yii Framework Forum: image upload for user profile - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

image upload for user profile image upload functionality in user profile. Rate Topic: -----

#1 User is offline   codesutra 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 596
  • Joined: 15-March 11
  • Location:India

Posted 22 March 2011 - 04:15 AM

hi folks,

Any body can tell me how can i give a functionality of image upload to user in his profile.with the help of existing helper classes of yii..!!!

i am stuck with this little issue with yii..sine i am new in yii development.. :P
CodeSutra
0

#2 User is offline   Gustavo 

  • Master Member
  • Yii
  • Group: Moderators
  • Posts: 916
  • Joined: 27-July 10
  • Location:Curitiba - Brasil

Posted 22 March 2011 - 05:02 AM

use CUploadedFile helper

$file=CUploadedFile::getInstance($model,'attributeName');
$file->saveAs('my/location/'.$file->getName());
//or
$file->saveAs('my/location/myFile.'.$file->getExtensionName());

--
Extensions:
translate modue - module to handle translations
multiActiveRecord - db selection in models
redisCache - redis cache component
mpCpanel - interact with cpanel api
mUploadify - use uploadify uploader in your application

Gustavo Salomé Silva
1

#3 User is offline   codesutra 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 596
  • Joined: 15-March 11
  • Location:India

Posted 22 March 2011 - 05:22 AM

View PostGustavo, on 22 March 2011 - 05:02 AM, said:

use CUploadedFile helper

$file=CUploadedFile::getInstance($model,'attributeName');
$file->saveAs('my/location/'.$file->getName());
//or
$file->saveAs('my/location/myFile.'.$file->getExtensionName());



ok, i have done this upload image work.but i want a resizing of image also when we we upload an image.

i mean to say on run time i want a image resizing also to store thumbnail image also..!!
CodeSutra
0

#4 User is offline   Gustavo 

  • Master Member
  • Yii
  • Group: Moderators
  • Posts: 916
  • Joined: 27-July 10
  • Location:Curitiba - Brasil

Posted 22 March 2011 - 05:24 AM

use some kind of extension
--
Extensions:
translate modue - module to handle translations
multiActiveRecord - db selection in models
redisCache - redis cache component
mpCpanel - interact with cpanel api
mUploadify - use uploadify uploader in your application

Gustavo Salomé Silva
0

#5 User is offline   codesutra 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 596
  • Joined: 15-March 11
  • Location:India

Posted 22 March 2011 - 06:00 AM

View PostGustavo, on 22 March 2011 - 05:24 AM, said:

use some kind of extension


ooopss...i didn't get succeed with this complete task..as i mention above..

would you please help me little bit more.. :blink:

i want to upload an image on user registration and want to display a thumbnail image on his profile.please guide me to complete this task..

i am hanging with syntexs of yii...!!!
CodeSutra
0

#6 User is offline   donrra 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 03-August 11

Posted 12 October 2012 - 02:33 PM

Try the ePhpThumb extension (http://www.yiiframew...nsion/ephpthumb)
0

#7 User is offline   Ujjwal Prajapati 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 47
  • Joined: 24-April 12

Posted 15 October 2012 - 12:57 AM

I am using this extension for the very purpose.
http://www.yiiframew...xtension/image/

Try It.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users