diff --git a/roundup/cgi/client.py b/roundup/cgi/client.py
index 372100284369582e2cd7398054f5f2d00ec35276..b53a38cd8c6d812643817ea2295eb0eec19a4a2b 100644 (file)
--- a/roundup/cgi/client.py
+++ b/roundup/cgi/client.py
-# $Id: client.py,v 1.152 2004-01-19 23:56:07 richard Exp $
+# $Id: client.py,v 1.153 2004-01-20 03:58:38 richard Exp $
__doc__ = """
WWW request handler (also used in the stand-alone server).
props['name'] = fn
# use this info as the type/filename properties
if propdef.has_key('type'):
- props['type'] = mimetypes.guess_type(fn)[0]
- if not props['type']:
+ if hasattr(value, 'type'):
+ props['type'] = value.type
+ elif mimetypes.guess_type(fn)[0]:
+ props['type'] = mimetypes.guess_type(fn)[0]
+ else:
props['type'] = "application/octet-stream"
# finally, read the content RAW
value = value.value