-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
[files_external] Wrong setup of S3 options #58882
Description
I might have found the issue. After looking at the requests the frontend sends. I noticed that there is a mismatch in required parameters. In my case it was a S3 mount for which I was not able to do modifications.
So the request it does looks like this
{"id":3,"mountPoint":"/R2","backend":"amazons3","authMechanism":"amazons3::accesskey","backendOptions":{"bucket":"<redacted>","storageClass":"","legacy_auth":false,"useMultipartCopy":true,"key":"<redacted>","secret":"__unmodified__","use_path_style":true,"hostname":"<redacted>.r2.cloudflarestorage.com","region":"auto","sse_c_key":"__unmodified__","encrypt":"1","port":"","use_ssl":true},"priority":100,"applicableUsers":["sample-user"],"mountOptions":{"encrypt":"1","previews":"1","enable_sharing":"","filesystem_check_changes":"1","encoding_compatibility":"","readonly":""},"userProvided":false,"type":"system"}After sending this I got
{
"message": "Unbefriedigende Backend- Parameter"
}Which lead to the conclusion that some parameters of the backend were not present in the request
And after looking at
server/apps/files_external/lib/Lib/Backend/AmazonS3.php
Lines 49 to 51 in a119716
(new DefinitionParameter('use_presigned_url', $l->t('Use presigned S3 url'))) ->setType(DefinitionParameter::VALUE_BOOLEAN) ->setDefaultValue(false), The parameter use_presigned_url does have a default but is not defined as optional.
When replaying the request I added
"use_presigned_url":false,to thebackendOptionsjson part and then it worked.
Also subsequent requests from the UI now work for this mount.Additionally when toggling the "use_presigned_url" config once in the UI when creating a new mount also places this key in the JSON and it worked immediately for me.
So my suspicion is that every mount which gained some parameters which have a default but are not optional could be affected by this. That's also the reason why "Local" mounts always worked because they only consist of required parameters.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status