From cc5ab7a365e2e045cc1af43727e56f56d088a0df Mon Sep 17 00:00:00 2001 From: winter Date: Fri, 7 Feb 2025 19:45:36 +0000 Subject: more stuff :3 - post form detects images better - post form is preserved across navigations - post form has most options hidden - details/summaries use nicer icons --- routes/note_fragment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routes') diff --git a/routes/note_fragment.php b/routes/note_fragment.php index 916fc8d..21a5369 100644 --- a/routes/note_fragment.php +++ b/routes/note_fragment.php @@ -147,7 +147,7 @@ Router::getInstance()->mount('/fragment/note/attachmentPill', function (array $a // store the file and return a pill for it // TODO: allow other providers $obj = StorageObject::createFromUpload(FilesystemStorage::class, $_FILES['file']); - $type = str_starts_with($obj->mimetype, 'image/') ? 'image' : 'file'; + $type = $obj->isImage() ? 'image' : 'file'; render_template('attachment_pill', [ 'type' => $type, 'oid' => $obj->oid, -- cgit v1.3