⚠️ This issue respects the following points: ⚠️
Bug description
The config setting 'use_presigned_url' => true does not produce presigned URLs.
When I force it to set true adding it directly to the function __construct(array $parameters) it starts to work correctly though.
It's very likely it's because getConnection() in file lib/private/Files/ObjectStore/S3ConnectionTrait.php is called lazily, not at construct time.
isUsePresignedUrl() (line 298) can be called before getConnection() has ever been invoked
- in that case,
$this->connection is still null, but the early-return guard means the assignment on line 112 hasn't run yet
- so
isUsePresignedUrl() returns the hardcoded default false, regardless of the config
Steps to reproduce
- 'use_presigned_url' => true
- No presigned URLs in DAVs request:
<oc:downloadURL></oc:downloadURL><nc:download-url-expirat ion></nc:download-url-expiration>
Expected behavior
We should get <oc:downloadURL>http://192.168.48.87:29080/aio/urn%3Aoid% 3A5?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=CAG7CCAADYQZ5FK1XPTQ%2F20260327%2Fap-southeast-1%2Fs3%2Faws4_request&X-Amz-Date=20260327T0125 17Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3599&X-Amz-Signature=9b0d1ff332bb812f451923267b5c3f58bef25aa723535058537c535a278fc8aa</oc:downloadURL><nc:download-url-expiration>1774578316</ nc:download-url-expiration>
Nextcloud Server version
33
Operating system
Other
PHP engine version
Other
Web server
Apache (supported)
Database engine version
None
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
Bug description
The config setting
'use_presigned_url' => truedoes not produce presigned URLs.When I force it to set
trueadding it directly to the function__construct(array $parameters)it starts to work correctly though.It's very likely it's because
getConnection()in filelib/private/Files/ObjectStore/S3ConnectionTrait.phpis called lazily, not at construct time.isUsePresignedUrl()(line 298) can be called beforegetConnection()has ever been invoked$this->connectionis still null, but the early-return guard means the assignment on line 112 hasn't run yetisUsePresignedUrl()returns the hardcoded default false, regardless of the configSteps to reproduce
<oc:downloadURL></oc:downloadURL><nc:download-url-expirat ion></nc:download-url-expiration>Expected behavior
We should get
<oc:downloadURL>http://192.168.48.87:29080/aio/urn%3Aoid% 3A5?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=CAG7CCAADYQZ5FK1XPTQ%2F20260327%2Fap-southeast-1%2Fs3%2Faws4_request&X-Amz-Date=20260327T0125 17Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3599&X-Amz-Signature=9b0d1ff332bb812f451923267b5c3f58bef25aa723535058537c535a278fc8aa</oc:downloadURL><nc:download-url-expiration>1774578316</ nc:download-url-expiration>Nextcloud Server version
33
Operating system
Other
PHP engine version
Other
Web server
Apache (supported)
Database engine version
None
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response