[FIX]Fixed code for showing size of upload file.

lp bug: https://launchpad.net/bugs/901068 fixed

bzr revid: kch@tinyerp.com-20111215102910-zjyp5rsp3wbugoyu
This commit is contained in:
Kunal Chavda (OpenERP) 2011-12-15 15:59:10 +05:30
parent a44dd489d0
commit f1e25838b6
1 changed files with 2 additions and 2 deletions

View File

@ -270,7 +270,7 @@ class Database(openerpweb.Controller):
params['db_lang'],
params['create_admin_pwd']
)
try:
return req.session.proxy("db").create(*create_attrs)
except xmlrpclib.Fault, e:
@ -1181,7 +1181,7 @@ class Binary(openerpweb.Controller):
}
</script>"""
data = ufile.read()
args = [ufile.content_length, ufile.filename,
args = [len(data), ufile.filename,
ufile.content_type, base64.b64encode(data)]
except Exception, e:
args = [False, e.message]