79085287

Date: 2024-10-14 08:18:40
Score: 0.5
Natty:
Report link

Solved with the following change:

                                fileAttachment.Load().Wait();
                            if (fileAttachment.Content != null && fileAttachment.Content.Length > 0)
                            {
                                string filePath = Path.Combine(directoryPath, fileAttachment.Name);
                                File.WriteAllBytes(filePath, fileAttachment.Content);
                                Console.WriteLine($"Attachment saved to: {filePath}");
                            }
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: user2731015