From 482fd7adee5e9e0990bf5904ed7d754d315de649 Mon Sep 17 00:00:00 2001 From: Arno Richter Date: Wed, 21 Dec 2022 15:05:28 +0100 Subject: first attempt at image attachments! --- templates/postform.inc.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'templates/postform.inc.php') diff --git a/templates/postform.inc.php b/templates/postform.inc.php index 149028b..df7566c 100644 --- a/templates/postform.inc.php +++ b/templates/postform.inc.php @@ -10,7 +10,7 @@ $message = array(); if(!empty($_POST['content'])) { - + $id = db_insert($_POST['content'], NOW); if($id > 0) { @@ -19,6 +19,11 @@ 'message' => 'Successfully posted status #'.$id ); + // handle files + if(!empty($_FILES['attachments'])) { + attach_uploaded_files($_FILES['attachments'], $id); + } + rebuild_feeds(); if($config['ping'] == true) ping_microblog(); if($config['crosspost_to_twitter'] == true) { @@ -43,10 +48,16 @@

-
+ -

- + +
+ + +
    +

    + +
    -- cgit v1.2.3