]> BookStack Code Mirror - bookstack/blobdiff - app/Uploads/AttachmentService.php
fix(wysiwyg): preserves line feeds in code block mode
[bookstack] / app / Uploads / AttachmentService.php
index e62a18c8200fed7665b3f263989b0afb4b47511b..7974d7ae926b1472f61f567811e527acc254e688 100644 (file)
@@ -233,4 +233,12 @@ class AttachmentService
 
         return $attachmentPath;
     }
+
+    /**
+     * Get the file validation rules for attachments.
+     */
+    public function getFileValidationRules(): array
+    {
+        return ['file', 'max:' . (config('app.upload_limit') * 1000)];
+    }
 }