> This may be a silly question, but how do I return a file as my response?
>
> For example, for the purposes of tracking email opens I need to return  
> a transparent gif as my response.  Can I just set the body of the  
> response to be the file content, and set the correct mime-type?  Or do  
> I need to do something different?
>
> Unfortunately I'm working with a legacy system, so I can't not return  
> a transparent gif for the moment, but if there's better ways to do it  
> in the long-term, I'd also be interested.

afaik something like:

fp = open("blank.gif")
return BaseResponse(wrap_file(environ, fp), mimetype='image/gif',
direct_passthrough=True)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" 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/pocoo-libs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to