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

BSD fixes #318: Upload file size limit #319

Merged
merged 5 commits into from
Oct 30, 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
8 changes: 4 additions & 4 deletions .platform/applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ bixalcom:
env:
N_PREFIX: /app/.global
php:
post_max_size: '90M'
upload_max_filesize: '90M'
post_max_size: '300M'
upload_max_filesize: '300M'

# The relationships of the application with services or other applications.
#
Expand Down Expand Up @@ -161,10 +161,10 @@ bixalcom:
# Redirect any incoming request to Drupal's front controller.
passthru: '/index.php'

# Allow 90M files to be uploaded.
# Allow 300M files to be uploaded.
request_buffering:
enabled: true
max_request_size: 100m
max_request_size: 320m

# Deny access to all static files, except those specifically allowed below.
allow: false
Expand Down
2 changes: 1 addition & 1 deletion config/sync/field.field.media.image.field_media_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ settings:
handler_settings: { }
file_directory: '[date:custom:Y]-[date:custom:m]'
file_extensions: 'png gif jpg jpeg svg webp'
max_filesize: ''
max_filesize: '100 MB'
max_resolution: ''
min_resolution: ''
alt_field: true
Expand Down
2 changes: 1 addition & 1 deletion config/sync/field.field.media.pdf.field_media_file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ settings:
handler_settings: { }
file_directory: '[date:custom:Y]-[date:custom:m]'
file_extensions: pdf
max_filesize: ''
max_filesize: '100 MB'
description_field: true
field_type: file
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ settings:
handler_settings: { }
file_directory: '[date:custom:Y]-[date:custom:m]'
file_extensions: 'mp4 webm'
max_filesize: ''
max_filesize: '300 MB'
description_field: false
field_type: file
2 changes: 2 additions & 0 deletions lando-config/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
; only critical errors and suppresses these connection errors.
; https://xdebug.org/docs/all_settings#XDEBUG_CONFIG
;xdebug.log_level=0
post_max_size=300M
upload_max_filesize=300M
4 changes: 2 additions & 2 deletions orch/deploy_install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env bash

set -e

./orch/show_file.sh $0

# Normally, XDEBUG_MODE=debug,develop but develop breaks the Drupal installation.
Expand All @@ -12,6 +10,8 @@ fi

drush cr

set -e

# If using Postgres, enable the pg_trgm extension which is required before
# Drupal is installed.
if [ -n "$(drush status | grep pgsql 2>/dev/null)" ]; then
Expand Down
3 changes: 2 additions & 1 deletion web/sites/default/settings.memcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
if ((
!InstallerKernel::installationAttempted() &&
(extension_loaded('memcached') || extension_loaded('memcache')) &&
file_exists($app_root . '/modules/contrib/memcache')
file_exists($app_root . '/modules/contrib/memcache') &&
!function_exists('_settings_memcache')
)) {
function _settings_memcache(array &$settings, string $host): void {
$settings['memcache']['servers'][$host] = 'default';
Expand Down
3 changes: 2 additions & 1 deletion web/sites/default/settings.redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
if ((
!InstallerKernel::installationAttempted() &&
extension_loaded('redis') &&
class_exists('Drupal\redis\ClientFactory')
class_exists('Drupal\redis\ClientFactory') &&
!function_exists('_settings_redis')
)) {
function _settings_redis(array &$settings, string $host, string $port): void {
$settings['redis.connection']['host'] = $host;
Expand Down