← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1613703] [NEW] Types of form values are lost when transferred using multipart/form-data

 

Public bug reported:

Django REST wrappers defined on Horizon's server-side to receive data
from Angular modal forms rely on field values being transferred along
with their type using JSON format, i.e. number widgets produce
'{number_field: 42}', boolean fields produce '{boolean_field: true} etc.
This assumption becomes wrong when a FileField is present in such form,
because to transfer it browser has to use 'Content-Type: multipart/form-
data' header, which forces every field to pass its value as a string.

This becomes a real problem as soon as Glance V2 API is fully supported
by Horizon, since Glance V2 requires that image properties types obey
the types defined in the schema.

** Affects: horizon
     Importance: High
         Status: New

** Changed in: horizon
   Importance: Undecided => High

** Changed in: horizon
    Milestone: None => newton-3

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1613703

Title:
  Types of form values are lost when transferred using multipart/form-
  data

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  Django REST wrappers defined on Horizon's server-side to receive data
  from Angular modal forms rely on field values being transferred along
  with their type using JSON format, i.e. number widgets produce
  '{number_field: 42}', boolean fields produce '{boolean_field: true}
  etc. This assumption becomes wrong when a FileField is present in such
  form, because to transfer it browser has to use 'Content-Type:
  multipart/form-data' header, which forces every field to pass its
  value as a string.

  This becomes a real problem as soon as Glance V2 API is fully
  supported by Horizon, since Glance V2 requires that image properties
  types obey the types defined in the schema.

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1613703/+subscriptions


Follow ups