Do you have a route beginning with 'uploads'? You could just construct
a regular img tag & link (ie. without the helper), seeing as you want
to avoid any controllers that Router might think you're pointing to.

On Mon, May 18, 2009 at 3:50 PM, foldiman <vi...@vinceallen.com> wrote:
>
> I'm stuck trying to construct a URL using the html helper that points
> to an jpeg sitting in an 'uploads' folder in my webroot folder. I've
> tried the following.
>
> $html->link($html->image('/uploads/main_demo.jpg'), array($html->url('/
> uploads/main_zoom.jpg', true)), array('title' => 'hello', 'escape' =>
> false, 'class' => 'mg_main'));
>
> However, this creates the following URL which is obviously broken.
>
> http://mysite/photos/mediagallery/http://mysite/uploads/main_zoom.jpg
>
> When I remove the 'true' option from the $html->url statement I get
> this which is also wrong.
>
> http://mysite/photos/mediagallery/uploads/main_zoom.jpg
>
> And then I also noticed that when I go to the following url, Cake asks
> for a controller which is of course missing.
>
> http://mysite/uploads/main_zoom.jpg
>
> So how can I just point the browser to this image?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to