diff options
| author | winter | 2025-02-07 19:45:36 +0000 |
|---|---|---|
| committer | winter | 2025-02-07 19:45:36 +0000 |
| commit | cc5ab7a365e2e045cc1af43727e56f56d088a0df (patch) | |
| tree | 1e80a0aedba4cb4dcdda098d7e4497a52cb105a9 /routes/note_fragment.php | |
| parent | d18ec187847893f94418b29bc6a087d6b2dd9a2d (diff) | |
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
Diffstat (limited to 'routes/note_fragment.php')
| -rw-r--r-- | routes/note_fragment.php | 2 |
1 files changed, 1 insertions, 1 deletions
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, |
