Hi there,

I've recently upgraded to the latest version of Web2py (1.99.4
(2012-02-04 10:13:29) stable)

For some reason when I attempt to upload (or perhaps download) images
using GAE launcher (version 1.6.2) the images are being truncated to <
200 bytes. Rather than the full 48k file.

db.define_table('test', db.Field('image', 'upload'))

def create_test():
  tests = db(db.test.id > 0).select()

  form = SQLFORM(db.test)

  if form.accepts(request, session):
    response.flash = 'Thanks!'

  return dict(form = form, tests = tests)

def download():
  return response.download(request, db)

In the HTML:

{{= form }}

<hr/>

{{ for test in tests: }}
  {{= A('download', _href = URL('download', args=test.image)) }}
  {{= IMG(_src = URL('download', args=test.image)) }} <br/>
{{ pass }}

Any ideas?

Thanks in advance,
Matt

Reply via email to