@xuda.io/drive_module 1.1.1386 → 1.1.1387
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 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2489,6 +2489,42 @@ export const file_upload_validator = function (file_name) {
|
|
|
2489
2489
|
case 'ear':
|
|
2490
2490
|
return { valid: true, category: 'archive', mime: 'application/octet-stream' };
|
|
2491
2491
|
|
|
2492
|
+
// ==============================
|
|
2493
|
+
// PICTURES & DESIGN
|
|
2494
|
+
// ==============================
|
|
2495
|
+
case 'tiff':
|
|
2496
|
+
case 'tif':
|
|
2497
|
+
return { valid: true, category: 'image', mime: 'image/tiff' };
|
|
2498
|
+
case 'psd':
|
|
2499
|
+
return { valid: true, category: 'image', mime: 'image/vnd.adobe.photoshop' };
|
|
2500
|
+
|
|
2501
|
+
// ==============================
|
|
2502
|
+
// DOCUMENTS & SPREADSHEETS
|
|
2503
|
+
// ==============================
|
|
2504
|
+
case 'xls':
|
|
2505
|
+
return { valid: true, category: 'document', mime: 'application/vnd.ms-excel' };
|
|
2506
|
+
case 'xlsx':
|
|
2507
|
+
case 'xslx': // Handling common typo
|
|
2508
|
+
return { valid: true, category: 'document', mime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' };
|
|
2509
|
+
|
|
2510
|
+
// ==============================
|
|
2511
|
+
// FONTS
|
|
2512
|
+
// ==============================
|
|
2513
|
+
case 'ttf':
|
|
2514
|
+
return { valid: true, category: 'font', mime: 'font/ttf' };
|
|
2515
|
+
case 'otf':
|
|
2516
|
+
return { valid: true, category: 'font', mime: 'font/otf' };
|
|
2517
|
+
case 'woff':
|
|
2518
|
+
return { valid: true, category: 'font', mime: 'font/woff' };
|
|
2519
|
+
case 'woff2':
|
|
2520
|
+
return { valid: true, category: 'font', mime: 'font/woff2' };
|
|
2521
|
+
|
|
2522
|
+
// ==============================
|
|
2523
|
+
// SYSTEM & CONFIG
|
|
2524
|
+
// ==============================
|
|
2525
|
+
case 'plist':
|
|
2526
|
+
return { valid: true, category: 'text', mime: 'application/x-plist' };
|
|
2527
|
+
|
|
2492
2528
|
// ==============================
|
|
2493
2529
|
// DEFAULT (INVALID)
|
|
2494
2530
|
// ==============================
|