[1.1.6] rename functions and make SendFileResponse with a parameter for the folder (default resources), also put returntype boolean, add function that parse post params, if path is a dictionary try to load index.html
This commit is contained in:
parent
b3d60ad1ae
commit
41c8ccfee7
@ -42,5 +42,5 @@ using System.Runtime.InteropServices;
|
||||
* 1.1.3 Variables parsing now as a String
|
||||
* 1.1.4 add Woff as Binary type
|
||||
* 1.1.5 add a function to send an object as json directly
|
||||
* 1.1.6 rename functions and make SendFileResponse with a parameter for the folder
|
||||
* 1.1.6 rename functions and make SendFileResponse with a parameter for the folder,
|
||||
*/
|
||||
|
@ -48,8 +48,8 @@ namespace BlubbFish.Utils.IoT.Bots {
|
||||
} else {
|
||||
restr = restr.Substring(1);
|
||||
}
|
||||
if(restr == "") {
|
||||
restr = "index.html";
|
||||
if(Directory.Exists(folder + "/" + restr)) {
|
||||
restr += "/index.html";
|
||||
}
|
||||
String end = restr.IndexOf('.') != -1 ? restr.Substring(restr.IndexOf('.') + 1) : "";
|
||||
if(File.Exists(folder + "/" + restr)) {
|
||||
|
Loading…
Reference in New Issue
Block a user