summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CardDAV/ImageExportPlugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/CardDAV/ImageExportPlugin.php')
-rw-r--r--apps/dav/lib/CardDAV/ImageExportPlugin.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/dav/lib/CardDAV/ImageExportPlugin.php b/apps/dav/lib/CardDAV/ImageExportPlugin.php
index 192c1e69ed1..fa4d5ea23f2 100644
--- a/apps/dav/lib/CardDAV/ImageExportPlugin.php
+++ b/apps/dav/lib/CardDAV/ImageExportPlugin.php
@@ -103,7 +103,8 @@ class ImageExportPlugin extends ServerPlugin {
try {
$file = $this->cache->get($addressbook->getResourceId(), $node->getName(), $size, $node);
$response->setHeader('Content-Type', $file->getMimeType());
- $response->setHeader('Content-Disposition', 'attachment');
+ $fileName = $node->getName() . '.' . PhotoCache::ALLOWED_CONTENT_TYPES[$file->getMimeType()];
+ $response->setHeader('Content-Disposition', "attachment; filename=$fileName");
$response->setStatus(200);
$response->setBody($file->getContent());