From f43bd09b8287e3876b5a7396e6bb263c35e3972a Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Sun, 4 Jun 2017 14:59:25 -0400 Subject: Update df script to support message attachments Now, if a mesg guid is requested under attach/, the attachment file is served and offers the browser the content-disposition for that file. --- app/df.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app') diff --git a/app/df.php b/app/df.php index 9581cae..92dd9dd 100644 --- a/app/df.php +++ b/app/df.php @@ -13,6 +13,7 @@ */ require_once "class/user.class.php"; +require_once "class/mesg.class.php"; /* * This file is a proxy script for fetching resources from the /dynmic @@ -93,6 +94,11 @@ function main(string $dir, string $guid) : void case "bgs": serveResource("dynmic/bgs/" . $guid); break; + + case "attach": + $mesg = new mesg($guid); + serveResource("dynmic/attach/" . $guid, $mesg->attachment); + break; } } catch (Exception $e) -- cgit v1.2.3