imagecashletter icon indicating copy to clipboard operation
imagecashletter copied to clipboard

server: accept image data as multipart request

Open adamdecaf opened this issue 3 years ago • 2 comments

Related to https://github.com/moov-io/imagecashletter/issues/86 we should also accept image data as mult-part form params which can be replaced in the JSON representation. Bundling base64'd image data blobs in JSON can be a pain. The previous format would still be accepted.

I'm thinking that ImageViewData's ImageData could have identifiers related to the form blocks.

The block containing JSON would be named file.

{
  // ... 
  "imageViewData": {
    "imageData": ":checkOne:"
  },
  // ... 
}

Then a second block/boundary called checkOne with the encoded image data. The HTTP server would replace that data directly into the ImageViewData struct. We could try base64 decoding this data.

adamdecaf avatar Jul 24 '20 20:07 adamdecaf