@xuda.io/drive_module 1.1.1386 → 1.1.1388
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 +36 -6
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2441,12 +2441,6 @@ export const file_upload_validator = function (file_name) {
|
|
|
2441
2441
|
case 'md':
|
|
2442
2442
|
return { valid: true, category: 'text', mime: 'text/markdown' };
|
|
2443
2443
|
|
|
2444
|
-
// ==============================
|
|
2445
|
-
// VALIDATE DESIGN FILES
|
|
2446
|
-
// ==============================
|
|
2447
|
-
case 'psd':
|
|
2448
|
-
return { valid: true, category: 'image', mime: 'image/vnd.adobe.photoshop' };
|
|
2449
|
-
|
|
2450
2444
|
// ==============================
|
|
2451
2445
|
// VALIDATE ARCHIVE & PACKAGE FILES
|
|
2452
2446
|
// ==============================
|
|
@@ -2489,6 +2483,42 @@ export const file_upload_validator = function (file_name) {
|
|
|
2489
2483
|
case 'ear':
|
|
2490
2484
|
return { valid: true, category: 'archive', mime: 'application/octet-stream' };
|
|
2491
2485
|
|
|
2486
|
+
// ==============================
|
|
2487
|
+
// PICTURES & DESIGN
|
|
2488
|
+
// ==============================
|
|
2489
|
+
case 'tiff':
|
|
2490
|
+
case 'tif':
|
|
2491
|
+
return { valid: true, category: 'image', mime: 'image/tiff' };
|
|
2492
|
+
case 'psd':
|
|
2493
|
+
return { valid: true, category: 'design', mime: 'image/vnd.adobe.photoshop' };
|
|
2494
|
+
|
|
2495
|
+
// ==============================
|
|
2496
|
+
// DOCUMENTS & SPREADSHEETS
|
|
2497
|
+
// ==============================
|
|
2498
|
+
case 'xls':
|
|
2499
|
+
return { valid: true, category: 'document', mime: 'application/vnd.ms-excel' };
|
|
2500
|
+
case 'xlsx':
|
|
2501
|
+
case 'xslx': // Handling common typo
|
|
2502
|
+
return { valid: true, category: 'document', mime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' };
|
|
2503
|
+
|
|
2504
|
+
// ==============================
|
|
2505
|
+
// FONTS
|
|
2506
|
+
// ==============================
|
|
2507
|
+
case 'ttf':
|
|
2508
|
+
return { valid: true, category: 'font', mime: 'font/ttf' };
|
|
2509
|
+
case 'otf':
|
|
2510
|
+
return { valid: true, category: 'font', mime: 'font/otf' };
|
|
2511
|
+
case 'woff':
|
|
2512
|
+
return { valid: true, category: 'font', mime: 'font/woff' };
|
|
2513
|
+
case 'woff2':
|
|
2514
|
+
return { valid: true, category: 'font', mime: 'font/woff2' };
|
|
2515
|
+
|
|
2516
|
+
// ==============================
|
|
2517
|
+
// SYSTEM & CONFIG
|
|
2518
|
+
// ==============================
|
|
2519
|
+
case 'plist':
|
|
2520
|
+
return { valid: true, category: 'text', mime: 'application/x-plist' };
|
|
2521
|
+
|
|
2492
2522
|
// ==============================
|
|
2493
2523
|
// DEFAULT (INVALID)
|
|
2494
2524
|
// ==============================
|