How do you upload file? Can you show controller?

Marin

On Tue, Aug 13, 2013 at 12:10 PM, at <[email protected]> wrote:
>
>
> Hi,
>
> Please consider following model:
> db.define_table('mytable',
>                 Field('file1', type='upload', uploadseparate=True,
>                         requires =
> IS_EMPTY_OR(IS_UPLOAD_FILENAME(extension='pdf|jpg|png|gif|doc|docx|rtf|txt',
> error_message='Only PDF, Word Docs, RTF, Text & Images allowed')))
> )
>
> When a file is uploaded using following form, file extention automaticalyy
> changes to .txt:
> <form id="upload_form" class="block-content form" action="" method="post"
> enctype="multipart/form-data">
>      <input id="adm_file3" class="upload" type="file" name="file1">
>      <input id="attach_files" class="button" type="submit" value="Attach
> File(s)">
> </form>
>
> Any idea what could be the reason?
>
> Thanks
>
> --
>
> ---
> 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.
>
>

-- 

--- 
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.


Reply via email to