On Monday, November 11, 2019 at 12:10:53 PM UTC-8, Maurice Waka wrote:
>
> But I did upload and the image is in the folder.
>
How are you generating the URL for showarticle()?
Also, I think you can just do an ordinary file open(), rather than having
to import PIL and doing an Image.open()
BTW, I handle images as <IMG> tags, where src=showimg(id), and showimg()
reads the file. I also have an example, maybe previously posted, where I
use download() instead of a custom showimg(),so the controller does a
select on the upload table, and then
return dict(img=row.fdata)
and the view has
{{=IMG(_src=(URL"download", img), _alt="test image")}}
Good luck!
Dave S
/dps
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/6301fedd-ed05-484f-bffc-6afeb2f200cf%40googlegroups.com.