@xuda.io/drive_module 1.1.1376 → 1.1.1377
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +16 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2416,6 +2416,22 @@ export const file_upload_validator = function (file_name) {
|
|
|
2416
2416
|
case 'txt':
|
|
2417
2417
|
return { valid: true, category: 'text', mime: 'text/plain' };
|
|
2418
2418
|
|
|
2419
|
+
// ==============================
|
|
2420
|
+
// VALIDATE TEXT / CODE FILES
|
|
2421
|
+
// ==============================
|
|
2422
|
+
case 'csv':
|
|
2423
|
+
return { valid: true, category: 'text', mime: 'text/csv' };
|
|
2424
|
+
case 'json':
|
|
2425
|
+
return { valid: true, category: 'text', mime: 'application/json' };
|
|
2426
|
+
case 'csv':
|
|
2427
|
+
return { valid: true, category: 'text', mime: 'text/csv' };
|
|
2428
|
+
case 'xls':
|
|
2429
|
+
return { valid: true, category: 'document', mime: 'application/vnd.ms-excel' };
|
|
2430
|
+
case 'xlsx':
|
|
2431
|
+
return { valid: true, category: 'document', mime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' };
|
|
2432
|
+
case 'md':
|
|
2433
|
+
return { valid: true, category: 'text', mime: 'text/markdown' };
|
|
2434
|
+
|
|
2419
2435
|
// ==============================
|
|
2420
2436
|
// DEFAULT (INVALID)
|
|
2421
2437
|
// ==============================
|