[Kimchi-devel] [WIP][PATCH 2/4] Storage volume upload: Parse params for upload formdata
lvroyce0210 at gmail.com
lvroyce0210 at gmail.com
Thu Aug 21 14:42:59 UTC 2014
From: Royce Lv <lvroyce at linux.vnet.ibm.com>
When pass form to cherrypy, it is stored in cherrypy.request.params,
so adjust parse_request for this change.
Signed-off-by: Royce Lv <lvroyce at linux.vnet.ibm.com>
---
src/kimchi/control/utils.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/kimchi/control/utils.py b/src/kimchi/control/utils.py
index fbd5177..8620c1d 100644
--- a/src/kimchi/control/utils.py
+++ b/src/kimchi/control/utils.py
@@ -80,6 +80,8 @@ def parse_request():
except ValueError:
e = OperationFailed('KCHAPI0006E')
raise cherrypy.HTTPError(400, e.message)
+ elif mime_in_header('Content-Type', 'multipart/form-data'):
+ return cherrypy.request.params
else:
e = OperationFailed('KCHAPI0007E')
raise cherrypy.HTTPError(415, e.message)
--
1.8.3.2
More information about the Kimchi-devel
mailing list