Hi,
I already use this:
stream = open("<path>/teste_en.pdf", 'rb')
db.ensaios.insert(codigo_registro="novo ensaio",
en_pdf=stream
)
but I need to know if is a possible update a row with an upload.
2018-04-02 14:27 GMT-03:00 Diego Tostes <[email protected]>:
>
>
> 2018-04-02 13:22 GMT-03:00 Diego Tostes <[email protected]>:
>
>> Hi,
>>
>>
>> i have a table in my model called ensaios:
>>
>> Ensaios = db.define_table('ensaios',
>> Field('codigo_registro', 'string'),
>> Field('url', 'string'),
>> Field('titulo_pt', 'string'),
>> Field('titulo_en', 'string'),
>> Field('tags', 'text'),
>> Field('contato_publico', 'string'),
>> Field('email_contato_publico', 'string'),
>> Field('pt_pdf', 'upload'),
>> Field('en_pdf', 'upload'),
>> Field.Virtual('relatorio', lambda row: A('Relatorio',
>> _href=URL('default',
>> 'ensaios',
>> vars=dict(ensaio_id=
>> row.ensaios.id)))),
>> )
>>
>>
>> i will store pdfs from clinical trials. the problem is that i already
>> have more than 5000 pdfs.
>>
>> i tried to put all the pdfs inside of the
>> "web2py/applications/ensaiosclinicos/uploads"
>>
>>
>> and did insertions of the names of the files in the database. But I am
>> getting a error :
>>
>> 404 NOT FOUND
>>
>> Is it possible to do this ?
>>
>>
>> rgds
>>
>> Diego
>>
>>
>>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
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/d/optout.