From f1e25838b6094a14648297c632b45f95d9e040e4 Mon Sep 17 00:00:00 2001 From: "Kunal Chavda (OpenERP)" Date: Thu, 15 Dec 2011 15:59:10 +0530 Subject: [PATCH] [FIX]Fixed code for showing size of upload file. lp bug: https://launchpad.net/bugs/901068 fixed bzr revid: kch@tinyerp.com-20111215102910-zjyp5rsp3wbugoyu --- addons/web/controllers/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 81061ba5477..09b5299a555 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -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): } """ 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]