Implement updating files

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2018-06-14 10:27:02 +02:00
parent c816b15bfa
commit 581fa011e3
4 changed files with 52 additions and 31 deletions

View File

@@ -201,6 +201,15 @@ class AttachmentService {
} catch (InvalidAttachmentType $e) {
// just update without further action
}
$attachment->setLastModified(time());
$this->attachmentMapper->update($attachment);
// extend data so the frontend can use it properly after creating
try {
$service = $this->getService($attachment->getType());
$service->extendData($attachment);
} catch (InvalidAttachmentType $e) {
// just store the data
}
return $attachment;
}