Has anyone tried using the new Media View class? I think this is exactly what it's designed for.
On Dec 18, 1:45 am, Grant Cox <[EMAIL PROTECTED]> wrote: > Drop your Session Security.level to "medium", or update your Cake to > the newest branch - this session behaviour has been fixed in > r5982.https://trac.cakephp.org/ticket/3507 > > On Dec 17, 7:04 pm, krr <[EMAIL PROTECTED]> wrote: > > > A part of my application has display of images, and the images are not > > under webroot, but protected, so that only looged in users can view > > the images. > > > In my old plain php application, php script was checking for login and > > doing a readfile($image_file_path); and I was using it as below > > > <a href="/scripts/getimage?name=abcd.jpg"> > > > I am trying to migrate the app to cakephp, and I don't know how to > > emulate the samething in cakephp. I have written a controller for > > images (images data are stored in db table so can have a model, etc) > > and try to do the samething in getImage($imagename) method. > > > function getImage($imagename) > > { > > readfile($path.DS.$imagename); > > exit(); //no view rendering needed. > > > } > > > It works for one image, but after the execution, I find that the > > session is no more valid. Any clue as to what is wrong or any other > > ideas to implement the same? ( I cannot copy the images under webroot > > for security purposes, not even in cache directory). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---