[Zope] Mime types when uploading a file.

Phil Harris phil@philh.org
Mon, 12 Jul 1999 14:18:04 +0100


Hi all,

I've noticed that when creating my own file upload forms, if the file
uploaded doesn't have an entry in the list that zope knows, then you get
this error:

Traceback (innermost last):
  File c:\program files\soniczope2\lib\python\ZPublisher\Publish.py, line
255, in publish_module
  File c:\program files\soniczope2\lib\python\ZPublisher\Publish.py, line
157, in publish
  File c:\program files\soniczope2\lib\python\ZPublisher\mapply.py, line
154, in mapply
    (Object: upload_external)
  File c:\program files\soniczope2\lib\python\ZPublisher\Publish.py, line
98, in call_object
    (Object: upload_external)
  File C:\Program Files\soniczope2\lib\python\OFS\DTMLMethod.py, line 155,
in __call__
    (Object: upload_external)
  File C:\Program Files\soniczope2\lib\python\OFS\DTMLMethod.py, line 151,
in __call__
    (Object: upload_external)
  File C:\Program Files\soniczope2\lib\python\DocumentTemplate\DT_String.py,
line 502, in __call__
    (Object: upload_external)
  File C:\Program Files\soniczope2\lib\python\DocumentTemplate\DT_Util.py,
line 266, in eval
    (Object: upload_external(file,REQUEST))
  File <string>, line 0, in ?
  File C:\Program Files\soniczope2\lib\python\OFS\DTMLMethod.py, line 155,
in __call__
    (Object: upload_external)
  File C:\Program Files\soniczope2\lib\python\OFS\DTMLMethod.py, line 151,
in __call__
    (Object: upload_external)
  File C:\Program Files\soniczope2\lib\python\DocumentTemplate\DT_String.py,
line 502, in __call__
    (Object: upload_external)
KeyError: (see above)


Any ideas?

Phil
phil@philh.org