Skip to content

Commit

Permalink
perf: 上传限制改为1G
Browse files Browse the repository at this point in the history
  • Loading branch information
kuaifan committed Jun 20, 2022
1 parent 86886de commit 0147e7f
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/Api/FileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,8 @@ public function content__upload()
'xls', 'xlsx' => "excel",
'ppt', 'pptx' => "ppt",
'wps' => "wps",
'jpg', 'jpeg', 'png', 'gif', 'bmp', 'ico', 'raw' => "picture",
'rar', 'zip', 'jar', '7-zip', 'tar', 'gzip', '7z' => "archive",
'jpg', 'jpeg', 'png', 'gif', 'bmp', 'ico', 'raw', 'svg' => "picture",
'rar', 'zip', 'jar', '7-zip', 'tar', 'gzip', '7z', 'gz', 'apk', 'dmg' => "archive",
'tif', 'tiff' => "tif",
'dwg', 'dxf' => "cad",
'ofd' => "ofd",
Expand Down
4 changes: 2 additions & 2 deletions app/Module/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -2328,8 +2328,8 @@ public static function upload($param)
'drawio',
'mind',
'docx', 'wps', 'doc', 'xls', 'xlsx', 'ppt', 'pptx',
'jpg', 'jpeg', 'png', 'gif', 'bmp', 'ico', 'raw',
'rar', 'zip', 'jar', '7-zip', 'tar', 'gzip', '7z',
'jpg', 'jpeg', 'png', 'gif', 'bmp', 'ico', 'raw', 'svg',
'rar', 'zip', 'jar', '7-zip', 'tar', 'gzip', '7z', 'gz', 'apk', 'dmg',
'tif', 'tiff',
'dwg', 'dxf',
'ofd',
Expand Down
6 changes: 3 additions & 3 deletions config/laravels.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,9 @@
'log_level' => 4,
'log_file' => storage_path(sprintf('logs/swoole-%s.log', date('Y-m'))),
'document_root' => base_path('public'),
'buffer_output_size' => 512 * 1024 * 1024,
'socket_buffer_size' => 512 * 1024 * 1024,
'package_max_length' => 512 * 1024 * 1024,
'buffer_output_size' => 2 * 1024 * 1024,
'socket_buffer_size' => 8 * 1024 * 1024,
'package_max_length' => 1024 * 1024 * 1024, // 1GB
'reload_async' => true,
'max_wait_time' => 60,
'enable_reuse_port' => true,
Expand Down
2 changes: 1 addition & 1 deletion docker/nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ server {

root /var/www/public;

client_max_body_size 512M;
client_max_body_size 1024M;

autoindex off;
index index.html index.htm index.php;
Expand Down
6 changes: 3 additions & 3 deletions docker/php/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ max_input_time = 60

; Maximum amount of memory a script may consume
; http://php.net/memory-limit
memory_limit = 512M
memory_limit = 1024M

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
Expand Down Expand Up @@ -700,7 +700,7 @@ auto_globals_jit = On
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; http://php.net/post-max-size
post_max_size = 512M
post_max_size = 1024M

; Automatically add files before PHP document.
; http://php.net/auto-prepend-file
Expand Down Expand Up @@ -852,7 +852,7 @@ file_uploads = On

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 512M
upload_max_filesize = 1024M

; Maximum number of files that can be uploaded via a single request
max_file_uploads = 100
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/js/components/MDEditor/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
uploadIng: 0,
uploadFormat: ['jpg', 'jpeg', 'png', 'gif', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'esp', 'pdf', 'rar', 'zip', 'gz', 'ai', 'avi', 'bmp', 'cdr', 'eps', 'mov', 'mp3', 'mp4', 'pr', 'psd', 'svg', 'tif'],
actionUrl: $A.apiUrl('system/fileupload'),
maxSize: 204800
maxSize: 1024000
};
},
mounted() {
Expand Down
6 changes: 3 additions & 3 deletions resources/assets/js/pages/manage/components/DialogUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default {
},
maxSize: {
type: Number,
default: 204800
default: 1024000
}
},
Expand All @@ -39,8 +39,8 @@ export default {
'drawio',
'mind',
'docx', 'wps', 'doc', 'xls', 'xlsx', 'ppt', 'pptx',
'jpg', 'jpeg', 'png', 'gif', 'bmp', 'ico', 'raw',
'rar', 'zip', 'jar', '7-zip', 'tar', 'gzip', '7z',
'jpg', 'jpeg', 'png', 'gif', 'bmp', 'ico', 'raw', 'svg',
'rar', 'zip', 'jar', '7-zip', 'tar', 'gzip', '7z', 'gz', 'apk', 'dmg',
'tif', 'tiff',
'dwg', 'dxf',
'ofd',
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/js/pages/manage/components/TaskUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default {
props: {
maxSize: {
type: Number,
default: 204800
default: 1024000
}
},
Expand Down
6 changes: 3 additions & 3 deletions resources/assets/js/pages/manage/file.vue
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,8 @@ export default {
'drawio',
'mind',
'docx', 'wps', 'doc', 'xls', 'xlsx', 'ppt', 'pptx',
'jpg', 'jpeg', 'png', 'gif', 'bmp', 'ico', 'raw',
'rar', 'zip', 'jar', '7-zip', 'tar', 'gzip', '7z',
'jpg', 'jpeg', 'png', 'gif', 'bmp', 'ico', 'raw', 'svg',
'rar', 'zip', 'jar', '7-zip', 'tar', 'gzip', '7z', 'gz', 'apk', 'dmg',
'tif', 'tiff',
'dwg', 'dxf',
'ofd',
Expand All @@ -470,7 +470,7 @@ export default {
'rp',
],
uploadAccept: '',
maxSize: 204800,
maxSize: 1024000,
contextMenuItem: {},
contextMenuVisible: false,
Expand Down

0 comments on commit 0147e7f

Please sign in to comment.