aboutsummaryrefslogtreecommitdiffstats
path: root/src/fileAttachment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileAttachment.cpp')
-rw-r--r--src/fileAttachment.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fileAttachment.cpp b/src/fileAttachment.cpp
index 584ba12a..785e0b8e 100644
--- a/src/fileAttachment.cpp
+++ b/src/fileAttachment.cpp
@@ -29,6 +29,8 @@
#include "vmime/streamContentHandler.hpp"
+#include "vmime/contentDispositionField.hpp"
+
namespace vmime
{
@@ -78,7 +80,8 @@ void fileAttachment::generatePart(bodyPart& part) const
{
defaultAttachment::generatePart(part);
- ref <contentDispositionField> cdf = part.getHeader()->ContentDisposition();
+ ref <contentDispositionField> cdf = part.getHeader()->ContentDisposition().
+ dynamicCast <contentDispositionField>();
if (m_fileInfo.hasSize()) cdf->setSize(utility::stringUtils::toString(m_fileInfo.getSize()));
if (m_fileInfo.hasFilename()) cdf->setFilename(m_fileInfo.getFilename());