diff options
Diffstat (limited to 'lib/Controller/NoteController.php')
-rwxr-xr-x | lib/Controller/NoteController.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Controller/NoteController.php b/lib/Controller/NoteController.php index c67017f..f85c0bb 100755 --- a/lib/Controller/NoteController.php +++ b/lib/Controller/NoteController.php @@ -713,7 +713,8 @@ $folder = $cache->get("currentnote".$id); $data = $folder->get("data"); $f = $data->get($media); - $r = new FileDisplayResponse($f); + $r = new DataDisplayResponse($f->getContent()); + $r->addHeader("Content-Disposition", "attachment"); $r->addHeader("Content-Type", $f->getMimeType()); @@ -738,6 +739,8 @@ if($tmph){ try{ $this->CarnetFolder->get($path)->delete(); + $file = $this->CarnetFolder->newFile($path); + } catch(\OCP\Files\NotFoundException $e) { } |