Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update nginx configurations and php.ini to increase maximum file size. #944

Merged
merged 6 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions assets/js/Components/FilesModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,13 @@ class FilesModal extends React.Component {
return
}

if(file.size > 1024 * 1024 * 10) {
this.addMessage({severity: 'error', message: this.props.t('msg.file.replace.file_size'), timeout: 5000})
this.setState({ replaceFileObj: null })
this.forceUpdate()
return
}

this.setState({ replaceFileObj: file })
}

Expand Down
3 changes: 2 additions & 1 deletion build/nginx/deploy.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ server {

rewrite ^/udoit3/(.*)$ /$1 break;
try_files $uri @symfonyFront;
client_max_body_size 10M;
}

set $symfonyRoot /var/www/html/public;
Expand All @@ -29,4 +30,4 @@ server {
}
error_log /var/log/nginx/project_error.log;
access_log /var/log/nginx/project_access.log;
}
}
3 changes: 2 additions & 1 deletion build/nginx/local.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ server {

rewrite ^/udoit3/(.*)$ /$1 break;
try_files $uri @symfonyFront;
client_max_body_size 10M;
}

set $symfonyRoot /var/www/html/public;
Expand All @@ -29,4 +30,4 @@ server {
}
error_log /var/log/nginx/project_error.log;
access_log /var/log/nginx/project_access.log;
}
}
2 changes: 2 additions & 0 deletions build/nginx/php-custom.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
max_execution_time = 180
memory_limit = 800M
upload_max_filesize = 10M
post_max_size = 10M
3 changes: 2 additions & 1 deletion translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
"msg.sync.started": "Course scan started.",
"msg.sync.failed": "Course scan failed. Course is missing.",
"msg.file.replace.file_type": "File type not accepted. Please input a file with the correct filetype.",
"msg.file.replace.file_size": "File size too large. Please input a file of a size less than 10MB",
"msg.sync.completed": "Course scan completed.",
"msg.sync.course_inactive": "Course scan failed. Course is inactive.",

Expand Down Expand Up @@ -384,4 +385,4 @@

"rule.label.SearchKeyWord": "Keyword found",
"rule.desc.SearchKeyWord": "The keyword has been found"
}
}
1 change: 1 addition & 0 deletions translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
"msg.sync.started": "Se inició el escaneo del curso.",
"msg.sync.failed": "Falló el escaneo del curso. Falta el curso.",
"msg.file.replace.file_type": "El tipo de archivo no es válido. Por favor aporte un archivo de tipo correcto.",
"msg.file.replace.file_size": "El tamaño del archivo es demasiado grande. Por favor aporte un archivo de tamaño menor a 10MB",
"msg.sync.completed": "Escaneo del curso completado.",
"msg.sync.course_inactive": "Falló el escaneo del curso. El curso está inactivo.",

Expand Down
Loading