Question
· Dec 5, 2019

How to paste a copied document into a %GlobalBinaryStream from the clipboard.

Good day,

We upload images into the database with this code :

<tr>
<td align="right">FileName</td>
<td><input type=file size=200 name=FileStream></td>
</tr>

s FullFilename = %request.Get("FileName")
s FileName = ##class(%File).GetFilename(FullFilename)
s ItemImage.FileName = FileName

s ItemImage.fileSize = %request.MimeData("FileStream",1).Size
d ItemImage.Image.CopyFrom(%request.MimeData("FileStream",1))

The need is now to be able to copy a document (example as attached in an email) and paste to be saved into the  ItemImage.Image
%GlobalBinaryStream

Has anyone done something like this ?

Thanks

André

Discussion (2)2
Log in or sign up to continue