also mp4 as binary
This commit is contained in:
parent
9e82a3bc58
commit
1cc64de12b
@ -59,7 +59,7 @@ namespace BlubbFish.Utils.IoT.Bots {
|
|||||||
String end = restr.IndexOf('.') != -1 ? restr.Substring(restr.IndexOf('.') + 1) : "";
|
String end = restr.IndexOf('.') != -1 ? restr.Substring(restr.IndexOf('.') + 1) : "";
|
||||||
if(File.Exists(folder + "/" + restr)) {
|
if(File.Exists(folder + "/" + restr)) {
|
||||||
try {
|
try {
|
||||||
if(end == "png" || end == "jpg" || end == "jpeg" || end == "ico" || end == "woff") {
|
if(end == "png" || end == "jpg" || end == "jpeg" || end == "ico" || end == "woff" || end == "mp4") {
|
||||||
Byte[] output = File.ReadAllBytes(folder + "/" + restr);
|
Byte[] output = File.ReadAllBytes(folder + "/" + restr);
|
||||||
switch(end) {
|
switch(end) {
|
||||||
case "ico":
|
case "ico":
|
||||||
@ -68,6 +68,9 @@ namespace BlubbFish.Utils.IoT.Bots {
|
|||||||
case "woff":
|
case "woff":
|
||||||
cont.Response.ContentType = "font/woff";
|
cont.Response.ContentType = "font/woff";
|
||||||
break;
|
break;
|
||||||
|
case "mp4":
|
||||||
|
cont.Response.ContentType = "video/mpeg";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
cont.Response.OutputStream.Write(output, 0, output.Length);
|
cont.Response.OutputStream.Write(output, 0, output.Length);
|
||||||
if(printOutput) {
|
if(printOutput) {
|
||||||
|
Loading…
Reference in New Issue
Block a user