1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
<?php
return [
// Storage settings
'disk' => env('FILEUPLOAD_DISK', 'public'),
'storage_path' => env('FILEUPLOAD_PATH', 'uploads'),
// File size limits (in kilobytes)
'max_file_size' => env('FILEUPLOAD_MAX_SIZE', 10240), // 10MB default
// Allowed MIME types
'allowed_mimes' => [
'image/jpeg',
'image/png',
'image/gif',
'image/webp',
'image/svg+xml',
'application/pdf',
'application/msword',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/vnd.ms-excel',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'text/plain',
'application/zip',
'application/x-zip-compressed',
'application/x-tar',
'application/gzip',
],
// File extensions (corresponding to MIME types above)
'allowed_extensions' => [
'jpg', 'jpeg', 'png', 'gif', 'webp', 'svg',
'pdf',
'doc', 'docx',
'xls', 'xlsx',
'txt',
'zip', 'tar', 'gz',
],
// Chunked upload settings
'chunk_size' => env('FILEUPLOAD_CHUNK_SIZE', 1048576), // 1MB chunks
'chunk_temp_path' => 'chunks', // Within storage/app
'chunk_cleanup_hours' => 24, // Clean up orphaned chunks after 24 hours
// File expiration
'expiration_enabled' => env('FILEUPLOAD_EXPIRATION_ENABLED', true),
'expiration_days' => env('FILEUPLOAD_EXPIRATION_DAYS', 30),
// Rate limiting
'rate_limit' => [
'max_attempts' => env('FILEUPLOAD_RATE_LIMIT', 10),
'decay_minutes' => env('FILEUPLOAD_RATE_DECAY', 1),
],
// Multiple upload settings
'max_files_per_upload' => env('FILEUPLOAD_MAX_FILES', 5),
// URL generation
'url_expiration_minutes' => 60, // Signed URL expiration (if needed)
];
|