Hello Mate,
I seem to have a problem to upload Image file in the view... Here is
an example of how I implement it...

### In the Controller ##
def download():
    import os
    path=os.path.join(request.folder,'uploads',request.args[0])
    return response.stream(path)

def index():
     photoSet = db(db.photo.id>0).select()
     return photoSet

### In the View #####
  {{for photo in photoSet:}}
      <img src="{{=URL(r=request,f='download',
args=photo.fileupload)}}">
  {{pass}}

#########################################################################

I also follow instruction from thread like this one below and tried
using the following code for the "Download":
def download():
      return response.download(request,db)

http://groups.google.com/group/web2py/browse_thread/thread/2aff11d23ddb66bb/42767626a7e6a3a8?hl=en&lnk=gst&q=Img#42767626a7e6a3a8

I keep receiving a Bad Request message "400 Bad Request"  with link
like this when debugging with "Firebug" :
http://127.0.0.1:8000/BU/Action/download/FieldStorage%28%27file%27%2C%20%27models.jpg%27%2C%20%27%5Cxff%5Cxd8%5Cxff%5Cxe0%5Cx00%5Cx10JFIF%

Any idea will be must appreciated....

Thanks You
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to