Uploaded image for project: 'Webservices REST Module'
  1. Webservices REST Module
  2. RESTWS-641

Support mime-type when posting complex obs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: Should
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Complexity:
      Medium

      Description

      As it stands now, you cannot specify mime-type when posting base64 encoded complex obs.

      We should support data URI scheme for complex obs
      https://en.wikipedia.org/wiki/Data_URI_scheme

      This would mean that Base64-encoded values included in the JSON body when posting a complex value could include the mime type. For example: "data:image/png;base64,<base64 data>"

      When posting raw data using form-data, the mime-type should be passed (and received) in the Content-type header.

      Fix needs to go to https://github.com/openmrs/openmrs-module-webservices.rest/blob/master/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ObsResource1_8.java#L318-L321

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                ruhanga Nathan Ruhanga
                Reporter:
                raff Rafal Korytkowski
                Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                  Dates

                  Created:
                  Updated:

                    Time Tracking

                    Estimated:
                    Original Estimate - 1 day Original Estimate - 1 day
                    1d
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 2 days, 3 hours
                    2d 3h