summaryrefslogtreecommitdiffstats
path: root/app/df.php
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2017-06-04 14:59:25 -0400
committerMalf Furious <m@lfurio.us>2017-06-04 14:59:25 -0400
commitf43bd09b8287e3876b5a7396e6bb263c35e3972a (patch)
treeaa2fa121f9f6f7eecc384cbc736dc22713d9053f /app/df.php
parent138348bbd1318a3bc2ee5112eee44d385b21751e (diff)
downloadscrott-f43bd09b8287e3876b5a7396e6bb263c35e3972a.tar.gz
scrott-f43bd09b8287e3876b5a7396e6bb263c35e3972a.zip
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.
Diffstat (limited to '')
-rw-r--r--app/df.php6
1 files changed, 6 insertions, 0 deletions
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)