From 33389e842a9807a8a85af4823597365ce3d0b29d Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Mon, 10 Mar 2025 14:49:29 +0100 Subject: [PATCH] Set useMultiPartCopy=true everywhere and switch to nocc --- templates/application/config.php.erb | 2 +- templates/application/remount_user_bucket_as_project.sh | 2 +- templates/scriptreceiver/create_bucket.erb.sh | 2 +- templates/scriptreceiver/create_bucket_without_question.sh | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/application/config.php.erb b/templates/application/config.php.erb index 575ac05..809cd9f 100644 --- a/templates/application/config.php.erb +++ b/templates/application/config.php.erb @@ -76,7 +76,7 @@ $CONFIG = array ( 'region' => 'us-east-1', 'hostname' => '<%= @s3_host %>', 'port' => '', - 'useMultipartCopy' => false, + 'useMultipartCopy' => true, 'objectPrefix' => 'urn:oid:', 'autocreate' => false, 'use_ssl' => true, diff --git a/templates/application/remount_user_bucket_as_project.sh b/templates/application/remount_user_bucket_as_project.sh index e5a1a7f..568574f 100755 --- a/templates/application/remount_user_bucket_as_project.sh +++ b/templates/application/remount_user_bucket_as_project.sh @@ -52,7 +52,7 @@ echo ' "region": "'${region}'", "secret": "'${secret}'", "storageClass": "", - "useMultipartCopy": false, + "useMultipartCopy": true, "use_path_style": true, "use_ssl": true }, diff --git a/templates/scriptreceiver/create_bucket.erb.sh b/templates/scriptreceiver/create_bucket.erb.sh index 6a2b2f9..eb75000 100755 --- a/templates/scriptreceiver/create_bucket.erb.sh +++ b/templates/scriptreceiver/create_bucket.erb.sh @@ -38,7 +38,7 @@ preexisting="$(docker exec -u www-data -i "${container}" php --define apc.enable if [[ -z ${preexisting} ]]; then docker exec -u www-data -i "${container}" php --define apc.enable_cli=1 /var/www/html/occ files_external:create "${user_bucket_name}" \ amazons3 -c bucket="${bucket}" -c key="${key}" -c secret="${secret}" -c hostname="${endpoint}" -c use_ssl=true -c use_path_style=true -c region=us-east-1 \ - -c useMultipartCopy=false amazons3::accesskey --user ${user} + -c useMultipartCopy=true amazons3::accesskey --user ${user} for shareid in $(docker exec -u www-data -i ${container} php --define apc.enable_cli=1 /var/www/html/occ files_external:export ${user} | jq -r '.[].mount_id'); do docker exec -u www-data -i ${container} php --define apc.enable_cli=1 /var/www/html/occ files_external:option ${shareid} enable_sharing true done diff --git a/templates/scriptreceiver/create_bucket_without_question.sh b/templates/scriptreceiver/create_bucket_without_question.sh index e128360..48f9bad 100644 --- a/templates/scriptreceiver/create_bucket_without_question.sh +++ b/templates/scriptreceiver/create_bucket_without_question.sh @@ -7,7 +7,7 @@ bucket=${4} user=${5} /usr/local/bin/occ files_external:create "${bucket}" \ amazons3 -c bucket="${bucket}" -c key="${key}" -c secret="${secret}" -c hostname="${endpoint}" -c use_ssl=true -c use_path_style=true -c region=us-east-1 \ - -c useMultipartCopy=false amazons3::accesskey --user "${user}" -for shareid in $(/usr/local/bin/occ files_external:export "${user}" | jq -r '.[].mount_id'); do - /usr/local/bin/occ files_external:option "${shareid}" enable_sharing true + -c useMultipartCopy=true amazons3::accesskey --user "${user}" +for shareid in $(/usr/local/bin/nocc files_external:export "${user}" | jq -r '.[].mount_id'); do + /usr/local/bin/nocc files_external:option "${shareid}" enable_sharing true done