hello,
maybe I'm totally on the wrong path, but this is my script for the moment:
- users can upload pictures. Uploads seems to be allowed only in
"myapp/uploads"
- I want to show these images, but images to be shown are only allowed
in "myapp/static"
- so I have to show images from "myapp/uploads"
I have the following controller:
def Show_Plaatje():
fh = open ( os.path.join ( 'applications', request.application,
'uploads', 'images', 'pic_53.png' ), 'rb')
data = fh.read()
fh.close()
return data
And in my view:
<img src="{{=URL('Show_Plaatje')}}"/>
This doesn't seem to work, if I look at the resulting html-source, I see
<img src="/Knutselen_Voor_Kinderen/default/Show_Plaatje">
thanks,
Stef
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.