Does anyone know how (if) this can be done? Ultimately, we want to send the attachment out of SM via email to a vendor for processing after the change ticket has been approved.
Cybersecurity
DevOps Cloud
IT Operations Cloud
If an answer to your question is correct, click on "Verify Answer" under the "More" button. The answer will now appear with a checkmark. Please be sure to always mark answers that resolve your issue as verified. Your fellow Community members will appreciate it!  Learn more
Dear Lee.
Could you show me how to get binary orginal images data in Data field of SYSATTACHMEM1 table. I want to reuse this data to show on my aspx webpage. I found that there are some bit HP add to before convert to binary image data so i can not get orginal image data using ihttphandler. It notice that images content errors.
Here is my pie of code in Handler.ashx file.
wrote:
Your solutions offered seem very promising. Ultimately, we want to send an email with the change details and email attached. I will try this solution and get back to you with my results.
byte[] orginalimg = new byte[] { };
byte[] Merger = null;
byte[] removebyte = HanderExten.StrToByteArray("_RCFM*=."); // i think HP add _RCFM*=. before convert to binary data and save to db
while (dReader.Read())
{
type=dReader["MIMETYPE"].ToString().Trim();
orginalimg = (byte[])dReader["DATA"];
orginalimg = orginalimg.Except(removebyte).ToArray(); // Remove addition byte data
if(Merger==null)
Merger = orginalimg;
else
Merger = Merger.Concat(orginalimg).ToArray(); // There are two row data of a image (merged data two rows)
}
context.Response.ContentType = type;
context.Response.BinaryWrite(Merger);
Thanks.