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.
List attachments = new List();
ContentReference cr = new ContentReference(mediaID);
var media = contentLoader.Get(cr);
if (media != null)
{
string filePath = string.Empty;
var fileBlob = media.BinaryData as FileBlob;
if (fileBlob != null)
{
filePath = fileBlob.FilePath;
attachments.Add(new Attachment(filePath));
}
}
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?
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?