'How to interpret DROP elements from dragging a file attachment off Outlook Online?

When I drag a file attachment from Outlook Online (Web, rendered in Firefox) to my app, I receive the following drop elements:

Dropped 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"
   }
}


Solution 1:[1]

Use TOleStream from Vcl.AxCtrls to convert from IStream to TStream and read the bytes.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 dwrbudr