Hmm for some reason it's not working for me. I took a look at the source 
code and this is the HTML that is being generated:

<img src="/download/image.a6e29a6f36771685.e58699e79c9f2e4a5047.JPG 
<view-source:http://127.0.0.1:8000/download/tutor.image.a6e29a6f36771685.e58699e79c9f2e4a5047.JPG>"
 />


And this is what I have in my view that is generating that code:

{{=IMG(_src=URL('default', 'download', args=row.image))}}

so it seems to be taking the 'download' directory and looking for the image 
there, but as aforementioned, I've set the directory for these images to be 
in:

Field('image', 'upload', 
uploadfolder=os.path.join(request.folder,'uploads/profiles/')

Should I just change the view to read URL('uploads/profiles/', 'download', 
args=row.image) or would that be an inelegant solution?


On Wednesday, December 5, 2012 2:06:57 PM UTC, Daniele wrote:
>
> Guys I know this sounds simple but I'm having a hard time displaying 
> uploaded images. I have an upload field in my model where logged in users 
> can upload an image. But in my views when I try to do 
> {{=IMG(_src=URL('uploads/', row.image))}} where row is a variable that 
> refers to db(db.auth_user.id > 0).select() nothing is being returned. 
> However, row.image returns a string which is the name of the file.
> How can I display the image correctly?
>
> Thanks!
>

-- 



Reply via email to