Hi Niphlod,
I reviewed your code, in your test method you have:
form = SQLFORM.factory(
Field('an_integer', 'integer'),
Field('upload_1', 'upload', uploadfolder=upf),
Field('upload_2', 'upload', uploadfolder=upf),
table_name='an_entry'
)
i don't want two field, i only want one field.
form = SQLFORM.factory(
Field('an_integer', 'integer'),
Field('attachment', 'upload', uploadfolder=upf),
table_name='an_entry'
)
and in my view
{{form.custom.widget["attachment"]['_multiple'] = "multiple"}}
Not this attachment has multiple attribute, multiple is HTML 5 attribute
and it enables me to select more than one file.
When i add multiple attribute and select more than one files, web2py gives
me an error:
<type 'exceptions.UnboundLocalError'> local variable 'source_file'
referenced before assignment
--
---
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.