mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
Allow for more and different files (MIME-types)
This commit is contained in:
1 parent
dbd60fc810
commit
b1ac33b7fb
1 file changed
+7
-3
+7
-3
@@ -19,9 +19,9 @@
|
|||||||
char buffer[BUFFER_SIZE];
|
char buffer[BUFFER_SIZE];
|
||||||
FILE *inptr, *dataptr, *ofile;
|
FILE *inptr, *dataptr, *ofile;
|
||||||
int outptr;
|
int outptr;
|
||||||
#define PATH_SIZE 1024
|
#define PATH_SIZE 20480
|
||||||
#define INDEX_SIZE 1024
|
#define INDEX_SIZE 20480
|
||||||
#define DEF_SIZE 1024
|
#define DEF_SIZE 20480
|
||||||
char pathbuffer[PATH_SIZE];
|
char pathbuffer[PATH_SIZE];
|
||||||
char ibuf[INDEX_SIZE];
|
char ibuf[INDEX_SIZE];
|
||||||
char dbuf[DEF_SIZE];
|
char dbuf[DEF_SIZE];
|
||||||
@@ -143,6 +143,10 @@ char *getMime(const char *name)
|
|||||||
return "image/svg+xml";
|
return "image/svg+xml";
|
||||||
else if (hasSuffix(name, ".png"))
|
else if (hasSuffix(name, ".png"))
|
||||||
return "image/png";
|
return "image/png";
|
||||||
|
else if (hasSuffix(name, ".js"))
|
||||||
|
return "text/javascript";
|
||||||
|
else if (hasSuffix(name, ".css"))
|
||||||
|
return "text/css";
|
||||||
return "text/plain";
|
return "text/plain";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user