Blazor server side, AttachFromFilename locks the attached file #354
abcdata2010
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Blazor server side, AttachFromFilename locks the attached file and when I try to override or delete the pdf file the error is "Cannot override/delete the file because it is being used by another process"
I cannot find a way to release or dispose of the attachment.
The code I am using is
var oneEmail = FluentEmail.Core.Email
.From(configuration["EmailSettings:From"])
.To(email.Email)
.Subject(email.Subject)
.AttachFromFilename(pdfFile, "application/pdf", "Document.pdf")
.UsingTemplateFromFile("Pages/Templates/EmailTemplate.cshtml", email);
var res = await oneEmail.SendAsync();
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions