AI OnAI Off
Instead of:
attachments.Add(new Attachment(filePath));
Try this:
attachments.Add(new Attachment(fileBlob.OpenRead(), media.Name));
Arghh.. forgot to check the overloads... thanks Dejan.. once again to the rescue..
Hi guys,
My client can upload Pdf's in the media library. Ofcourse this is saved as a Blob on disk and the name on disk is encoded in for example blob/jkfj2kl39erkjweklfjdklf/dfkjsdfkljsdfkldfj83.pdf
Now we have a functionality that the pdf's can be emailed using a form on a page. Now i can fetch this blob programmatically as so and attach this to an email.
However the pdf name is not nice and descriptive if you receive such a pdf. Are there alternatives on how i can sent the pdf in a more descriptive manner?