Yii Framework Forum: Is Assetmanager Good For Preventing Direct Access To Images ? - Yii Framework Forum

Jump to content

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

Is Assetmanager Good For Preventing Direct Access To Images ? Rate Topic: -----

#1 User is offline   manhooei 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 34
  • Joined: 13-September 11

Posted 08 June 2013 - 12:56 PM

I have this user directory that contains all my user's profile pictures.
When I use the image tag, it points to that user directory. If someone
wants to access that image using the direct link, they can. I want to
prevent them from being able to access an image directly. Can I use the
asset Manager in yii to make that happen or what I need is a totally
different thing ?
0

#2 User is offline   CeBe 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 506
  • Joined: 16-July 10
  • Location:Berlin. Germany

Posted 09 June 2013 - 03:41 AM

AssetManager is to publish files that are somewhere in a protected folder to web directory. They are then always public until you clear the asset directory.
I don't think it is usefull in your situation.
You may use sendFile
or xSendFile for this.
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