File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -15,13 +15,15 @@ bool loadFromFS(boolean spiffs, String path) {
15
15
if (path.endsWith (" /" )) { path += F (" index.htm" ); }
16
16
17
17
if (path.endsWith (F (" .src" ))) { path = path.substring (0 , path.lastIndexOf (" ." )); }
18
- else if (path.endsWith (F (" .htm" )) || path.endsWith (F (" .htm.gz" ))) { dataType = F (" text/html" ); }
18
+ else if (path.endsWith (F (" .htm" )) || path.endsWith (F (" .html " )) || path. endsWith ( F ( " . htm.gz " )) || path. endsWith ( F ( " .html .gz" ))) { dataType = F (" text/html" ); }
19
19
else if (path.endsWith (F (" .css" )) || path.endsWith (F (" .css.gz" ))) { dataType = F (" text/css" ); }
20
20
else if (path.endsWith (F (" .js" )) || path.endsWith (F (" .js.gz" ))) { dataType = F (" application/javascript" ); }
21
21
else if (path.endsWith (F (" .png" )) || path.endsWith (F (" .png.gz" ))) { dataType = F (" image/png" ); }
22
22
else if (path.endsWith (F (" .gif" )) || path.endsWith (F (" .gif.gz" ))) { dataType = F (" image/gif" ); }
23
23
else if (path.endsWith (F (" .jpg" )) || path.endsWith (F (" .jpg.gz" ))) { dataType = F (" image/jpeg" ); }
24
24
else if (path.endsWith (F (" .ico" ))) { dataType = F (" image/x-icon" ); }
25
+ else if (path.endsWith (F (" .svg" ))) { dataType = F (" image/svg+xml" ); }
26
+ else if (path.endsWith (F (" .json" ))) { dataType = F (" application/json" ); }
25
27
else if (path.endsWith (F (" .txt" )) ||
26
28
path.endsWith (F (" .dat" ))) { dataType = F (" application/octet-stream" ); }
27
29
else if (path.endsWith (F (" .esp" ))) { return handle_custom (path); }
You can’t perform that action at this time.
0 commit comments