Oh, I forgot. You will have to also change the mod_rewrite rules:

   # we skip all files with .something
   RewriteCond %{REQUEST_URI} \..+$
   RewriteCond %{REQUEST_URI} !\.(html|jpg)$
   RewriteRule .* - [L]

Notice the jpg in the 3rd line

Fabien

Fabien POTENCIER wrote:
> $response = $this->getResponse();
> 
> $response->setContentType('image/jpeg');
> $response->setContent($data[0]['Version'][0]['small_logo_data']);
> $response->sendHttpHeaders();
> $response->sendContent();
> 
> return sfView::NONE;
> 
> As far the routing rule is concerned, you can type something like this 
> in your routing.yml:
> 
> image:
>    url:   /image/:id.jpg
>    param: { ... }
> 
> HTH
> Fabien
> 
> Ian P. Christian wrote:
>> I know this is wrong:
>>
>>     $this->getResponse()->setContentType('image/jpeg');
>>     echo $data[0]['Version'][0]['small_logo_data'];
>>     return sfView::NONE;
>>
>> What's the right way?
>>
>> Also, all my URLs have .html on the end, is the only way to get this to
>> appear as  site.com/logos/aurl.png to use mod_rewrite? but then the
>> routing system can't generate URLs for it...
>>
>>
>>
>>
>>
>>
> 
> > 
> 
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to