[Kimchi-devel] [WIP][PATCH 2/4] Storage volume upload: Parse params for upload formdata

Aline Manera alinefm at linux.vnet.ibm.com
Thu Aug 21 18:56:26 UTC 2014


Reviewed-by: Aline Manera <alinefm at linux.vnet.ibm.com>

On 08/21/2014 11:42 AM, lvroyce0210 at gmail.com wrote:
> 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)




More information about the Kimchi-devel mailing list