When I drag a file attachment from Outlook Online (Web, rendered in Firefox) to my app, I receive the following drop elements:
But how do I get the attachment contents (the raw bytes of the attachment) from these? None of the elements are big enough to contain the 250K file that is attached, and the IStream
content consists just of these 16 bytes:
00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00
My suspicion is that it is this IStream
that I must use to stream the bytes from the browser to my application, but I can't fathom how to convert these bytes to a stream in my Delphi application.
Edit: JSON from application/x-moz-custom-clipdata
:
{
"itemType":"attachment",
"attachmentFile":{
"attachmentItemId":"AAM...BASE64...H6M=",
"name":"<FileName>.pdf",
"size":254330,
"fileType":5,
"type":"ItemIdAttachment:#Exchange",
"ContentType":"application/pdf"
}
}