im = Image.open('%s/blah.jpg' % settings.MEDIA_ROOT ) resp = HttpResponse( mimetype="image/jpeg" ) im.save( resp, 'JPEG' ) return resp
? On 04/09/2006, at 9:09 PM, Filipe wrote: > > Hi all, > > I need to make some images available on my django website that are > stored on an internal file server. The idea would be that Django would > be listening to requests for those images, the respective view would > read the bytes for the requested image (which would be available > locally via samba) and return the bytes to the web browser. > > Can the HttpResponse returned by a View object contain an image? are > there any examples? > Is this possible and the best way to do it? > > thanks in advance > -- Ian Holsman [EMAIL PROTECTED] http://garden-gossip.com/ -- what's in your garden? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---