From 15957203afe621be31b01f61a49dd92d534ce5b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Mon, 10 Feb 2020 22:46:05 +0100 Subject: [PATCH] Fixed an exception when moving an attachment to private folder. --- src/Services/Attachments/AttachmentSubmitHandler.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Services/Attachments/AttachmentSubmitHandler.php b/src/Services/Attachments/AttachmentSubmitHandler.php index d4867eaf..07d0b87c 100644 --- a/src/Services/Attachments/AttachmentSubmitHandler.php +++ b/src/Services/Attachments/AttachmentSubmitHandler.php @@ -232,6 +232,8 @@ class AttachmentSubmitHandler //Move file to new directory $fs = new Filesystem(); + //Ensure that the new path exists + $fs->mkdir(dirname($new_path)); $fs->rename($old_path, $new_path); //Save info to attachment entity