Hi Chris,
On Jul 9, 1:10 pm, Christopher Arndt <[EMAIL PROTECTED]> wrote:
...
> Can you show us the template code with the upload form and the
> controller method that displays it?
>
> Chris
Here's the form as it appears in the browser:
=============================================
<form name="attach_file" action="attach" enctype="multipart/form-data"
method="post">
<input id="upload_file" name="upload_file" type="file">
<input id="item_id" name="item_id" value="12" type="hidden">
<input value="Attach" type="submit">
</form>
Also, here is the error:
========================
Page handler: <bound method Root.attach of <ludwig.controllers.Root
object at 0x40b4cb8c>>
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/
cherrypy/_cphttptools.py", line 105, in _run
self.main()
File "/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/
cherrypy/_cphttptools.py", line 254, in main
body = page_handler(*virtual_path, **self.params)
TypeError: attach() takes at least 3 non-keyword arguments (1 given)
The http headers:
=================
HTTPS
-----
https://home.antroy.co.uk/ludwig/attach
POST /ludwig/attach HTTP/1.1
Host: home.antroy.co.uk
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:
1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
Accept: text/xml,pplication/xml,application/xhtml+xml,text/
html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-gb
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://home.antroy.co.uk/ludwig/idea?id=13
Cookie:
MSCSProfile=983BB0CC620F5E6D8FDE26829663AF160E24E956184D264AC0F984D54B2724032C97D9104378C98093AD52FCB999655E1864A893282B1FDC2F2AEAAC8EE14F737574BEF4DEBB4BE09F2A91E9F2E8875CE40F7BE7B8F5B12D68C11410417CEC8156472C0E0A0F12F1A3351CED17E19B95484F67C17508DC1F43EFE9B187F6C359EB8566ED4707375D;
tg-visit=ed49e34fadac973c3b8b1536d8456887503db3dd;
SQMSESSID=9886686baa8a24fecab7fa6bd7ee0148
Content-Type: multipart/form-data;
boundary=---------------------------101663069231913
Content-Length: 76110
-----------------------------101663069231913
Content-Disposition: form-data; name="upload_file";
filename="order.png"
Content-Type: image/png
PNG
HTTP/1.x 500 Internal error
Date: Mon, 09 Jul 2007 13:22:02 GMT
Server: CherryPy/2.2.1
Content-Length: 1290
Content-Type: text/html; charset=ISO-8859-1
Connection: close
----------------------------------------------------------
HTTP
----
http://home.antroy.co.uk/ludwig/attach
POST /ludwig/attach HTTP/1.1
Host: home.antroy.co.uk
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:
1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
Accept: text/xml,application/xml,application/xhtml+xml,text/
html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-gb
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://home.antroy.co.uk/ludwig/idea?id=13
Cookie:
MSCSProfile=983BB0CC620F5E6D8FDE26829663AF160E24E956184D264AC0F984D54B2724032C97D9104378C98093AD52FCB999655E1864A893282B1FDC2F2AEAAC8EE14F737574BEF4DEBB4BE09F2A91E9F2E8875CE40F7BE7B8F5B12D68C11410417CEC8156472C0E0A0F12F1A3351CED17E19B95484F67C17508DC1F43EFE9B187F6C359EB8566ED4707375D;
tg-visit=ed49e34fadac973c3b8b1536d8456887503db3dd;
SQMSESSID=9886686baa8a24fecab7fa6bd7ee0148
Content-Type: multipart/form-data;
boundary=---------------------------120561318431071
Content-Length: 76110
It appears that the form parameters are not being passed through to
the attach(self, upload_file, item_id, **kw) method.
--
Ant...
http://antroy.blogspot.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---