Is %CSP.BinaryStream compatible with %StreamGlobalBinary because reviewing the classes this doesn't look to be the case?
What I am trying to do is zip large documents before sending over a REST interface. I compress the file and add that to an Ens.StreamContainer which is then passed to the operation to build the REST payload. We are using %Net.MimePart class to build the payload and use the BodySet method to add the zipped Ens.StreamContainer.
The issue is when the REST interface receives the POST, it doesn't recognize the data as a zip compressed item.
Here is the code snippet from the REST operation class:
set oMimeBodyPart = ##class(%Net.MIMEPart).%New()
Do oMimeBodyPart.SetHeader("Content-Disposition","form-data; name=""file""; filename="""_reportFileName_"""")
One thing I thought of but haven't tried is to use StreamSet, but I think it might require something else to map from %StreamGlobalBinary to %CSP.BinaryStream.