[Kimchi-devel] [PATCH] storagevolume: Use default value for param 'name' when appropriate

Crístian Viana vianac at linux.vnet.ibm.com
Wed Sep 10 13:28:10 UTC 2014


Please, do not apply this patch. I assumed that, when uploading a file, 
the parameter 'file' would contain the file name, and thus I was getting 
the default 'name' value from there. But I found out the parameter 
'file' contains some binary representation of the file instead of its 
name, so this patch will not work.
The download related code is fine, though.

Does anyone have any suggestion on how to get a default name when 
uploading a file? IMO we'll have to make 'name' required for that case 
as well..

On 08-09-2014 16:22, Crístian Viana wrote:
> The parameter 'name' is only required when creating storage volumes with
> the parameter 'capacity' (i.e. an empty volume). When creating volumes
> with 'url' or 'file', the volume name will have a default value if 'name'
> is not specified.
>
> Use a default name when creating storage volumes from a file or from a URL.
> The default name will be the file's or the URL's basename.
>
> Signed-off-by: Crístian Viana <vianac at linux.vnet.ibm.com>




More information about the Kimchi-devel mailing list