I believe I posted a reply, but now it shows as deleted. I didn't delete
it. I was just quoting from the book.
You need to specify table= in your sqlform.factory.
On Tuesday, January 22, 2013 2:53:57 PM UTC-7, Massimo Di Pierro wrote:
>
> This is true. The fact is the SQLFORM.factory is not connect to a db
> therefore does not know where the app keeps uploads.
>
> On Tuesday, 22 January 2013 12:01:59 UTC-6, Ramos wrote:
>>
>> hello
>> my sqlform.factory below
>>
>> trab_id=db.trabalhador.insert(**db.trabalhador._filter_fields(form.vars))
>>
>> is not uploading a file
>>
>> First i got error
>> SQLFORM.factory - RuntimeError: you must specify a
>> Field(...,uploadfolder=...)
>>
>> so i added in my model
>>
>> Field('apt_medica','upload',
>> uploadfolder=os.path.join(request.folder,'uploads'),label='Ficha de aptidão
>> médica'),
>>
>> then the upload is done( i think! because no errors)
>>
>> Strangely in app admin when i click in the file link i get another error
>>
>> 404 not found
>>
>> the url is
>> http://127.0.0.1:8000/EMPRE2/appadmin/download/db/*no_table.*
>> apt_medica.b8e824a896390be6.737061333130322e747874.txt
>>
>> what does it mean *no_table *in the url?
>>
>>
>> Thank you
>>
>>
>>
--