AnsweredAssumed Answered

Add an attachment to a Notification using a stream

Question asked by jenna.guess on Aug 11, 2015
Latest reply on Feb 27, 2016 by danishahmedsiddiqui

I have a case where I am storing documents in a SQL database as a varbinary column.  I am successfully pulling that data from the SQL database as a list of base64 streams, using the SharePoint Copy.asmx CopyIntoItems method to use the base64 stream to upload a document into SharePoint.  Now, I'm trying to send a notification with an attachment of the same base64 stream.  On the attachment popup (within the Send Notification action), I select 'New File' where I can provide the File name, Content, and Mime Type (defaults to plain/text).  I'm setting using the following:


File Name: Test.pdf

Content: The stream that represents the PDF file (i.e. "JVBERi0xLjQKJdP0zOEKMSAwIG9iago8PAovQ3JlYXRpb25EYXRlKEQ...")

Mime Type: application/pdf


When I receive the notification the attachment will not open with the message "Adobe Reader could not open 'Test.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)."  I get the same result when attempting the same with a JPG file (Mime Type: image/jpg).


Is the 'Content' field on this screen only supposed to support plain text?  If that is the case, it seems strange to allow specification of a Mime Type since plain text would always be 'text/plain'.  Any suggestions/help would be appreciated.