aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Server
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.Server')
-rw-r--r--ShiftOS.Server/Program.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/ShiftOS.Server/Program.cs b/ShiftOS.Server/Program.cs
index 138764f..c0c27ed 100644
--- a/ShiftOS.Server/Program.cs
+++ b/ShiftOS.Server/Program.cs
@@ -655,6 +655,29 @@ Contents:
}
break;
+ case "download_start":
+ if (File.Exists(msg.Contents))
+ {
+ server.DispatchTo(new Guid(msg.GUID), new NetObject("download", new ServerMessage
+ {
+ Name = "download_meta",
+ GUID = "server",
+ Contents = JsonConvert.SerializeObject(File.ReadAllBytes(msg.Contents))
+ }));
+ }
+ else
+ {
+ server.DispatchTo(new Guid(msg.GUID), new NetObject("shiftnet_got", new ServerMessage
+ {
+ Name = "shiftnet_file",
+ GUID = "server",
+ Contents = (File.Exists("notfound.md") == true) ? File.ReadAllText("notfound.md") : @"# Not found.
+
+The page you requested at was not found on this multi-user domain."
+ }));
+
+ }
+ break;
case "shiftnet_get":
string surl = args["url"] as string;
while (surl.EndsWith("/"))