aboutsummaryrefslogtreecommitdiff
path: root/_wui/main.js
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-11-15 23:38:26 +0700
committerShulhan <ms@kilabit.info>2023-11-16 00:54:55 +0700
commitc96e06ab3b4e49dfe5bdb501d3a621e7deba29be (patch)
tree631930a08844aecaa24739a62aed575b4d55cb57 /_wui/main.js
parent5fd7868ea2fed0d977a55333faa79c31c3289b71 (diff)
downloadawwan-c96e06ab3b4e49dfe5bdb501d3a621e7deba29be.tar.xz
_wui: allow all content type but decrease max file size to 100KB
Previously, only file with type json, message, octet-stream, script, text, or xml that can be opened by editor. In this changes we allow all files as long as the size is less than 100KB.
Diffstat (limited to '_wui/main.js')
-rw-r--r--_wui/main.js8
1 files changed, 0 insertions, 8 deletions
diff --git a/_wui/main.js b/_wui/main.js
index 929774d..7fdcddf 100644
--- a/_wui/main.js
+++ b/_wui/main.js
@@ -732,14 +732,6 @@ var awwan = (() => {
code: 412,
message: ""
};
- let isTypeAllowed = false;
- if (node.content_type && (node.content_type.indexOf("json") >= 0 || node.content_type.indexOf("message") >= 0 || node.content_type.indexOf("octet-stream") >= 0 || node.content_type.indexOf("script") >= 0 || node.content_type.indexOf("text") >= 0 || node.content_type.indexOf("xml") >= 0)) {
- isTypeAllowed = true;
- }
- if (!isTypeAllowed) {
- res2.message = `The file "${node.name}" with content type "${node.content_type}" is not allowed to be opened`;
- return res2;
- }
if (node.size && node.size > MAX_FILE_SIZE) {
res2.message = `The file "${node.name}" with size ${node.size / 1e6}MB is greater than maximum ${MAX_FILE_SIZE / 1e6}MB.`;
return res2;