{"record":{"id":"99a5d829eb99530a","repo":"RocketChat/Rocket.Chat","slug":"fileupload-s3-bucketurl-bucketurl-has-no-sche","errorCode":null,"errorMessage":"FileUpload_S3_BucketURL \"${BucketURL}\" has no scheme; defaulting to \"https://${BucketURL}\".","messagePattern":"FileUpload_S3_BucketURL \"(.+?)\" has no scheme; defaulting to \"https://(.+?)\"\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"apps/meteor/server/lib/media/file-upload/config/AmazonS3.ts","lineNumber":120,"sourceCode":"\t\tconfig.connection.region = 'us-east-1';\n\t\tSystemLogger.warn(\n\t\t\t'FileUpload_S3_Region is empty and AWS_REGION is not set; defaulting to us-east-1. Set FileUpload_S3_Region or AWS_REGION to silence this warning.',\n\t\t);\n\t}\n\n\tif (AWSAccessKeyId && AWSSecretAccessKey) {\n\t\tconfig.connection.credentials = {\n\t\t\taccessKeyId: AWSAccessKeyId,\n\t\t\tsecretAccessKey: AWSSecretAccessKey,\n\t\t};\n\t}\n\n\t// Back-compat: AWS SDK v2 accepted scheme-less endpoints; v3 throws.\n\tif (BucketURL) {\n\t\tconst isValidScheme = hasScheme(BucketURL);\n\t\tconfig.connection.endpoint = isValidScheme ? BucketURL : `https://${BucketURL}`;\n\t\tif (!isValidScheme) {\n\t\t\tSystemLogger.warn(`FileUpload_S3_BucketURL \"${BucketURL}\" has no scheme; defaulting to \"https://${BucketURL}\".`);\n\t\t}\n\t}\n\n\tAmazonS3Uploads.store = FileUpload.configureUploadsStore('AmazonS3', AmazonS3Uploads.name, config);\n\tAmazonS3Avatars.store = FileUpload.configureUploadsStore('AmazonS3', AmazonS3Avatars.name, config);\n\tAmazonS3UserDataFiles.store = FileUpload.configureUploadsStore('AmazonS3', AmazonS3UserDataFiles.name, config);\n}, 500);\n\nsettings.watchByRegex(/^FileUpload_S3_/, configure);\n","sourceCodeStart":102,"sourceCodeEnd":130,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/lib/media/file-upload/config/AmazonS3.ts#L102-L130","documentation":"While configuring the S3 upload store, a custom FileUpload_S3_BucketURL was provided without an http(s):// scheme. AWS SDK v2 tolerated scheme-less endpoints but v3 rejects them, so Rocket.Chat prepends 'https://' and warns so the effective endpoint is not a surprise (e.g. for local MinIO where you may want http://).","triggerScenarios":"Entering a BucketURL like 'minio.internal:9000' or 's3.example.com' (no scheme) in the S3 storage settings — typical with MinIO/Ceph endpoints copied from configs originally written against SDK v2.","commonSituations":"Migrating file storage configs from older installs; internal MinIO endpoints where the admin omitted the scheme; endpoints behind TLS-terminating proxies where the intended scheme is ambiguous.","solutions":["Edit FileUpload_S3_BucketURL to include the scheme explicitly: 'https://minio.internal:9000'","Use 'http://' only for local/testing endpoints; keep 'https://' for anything remote","Re-save the S3 settings so the watcher reconfigures the stores with the corrected endpoint","Upload a test file afterwards to confirm the endpoint and path-style settings work together"],"exampleFix":"// before\nFileUpload_S3_BucketURL: 'minio.internal:9000'\n\n// after\nFileUpload_S3_BucketURL: 'https://minio.internal:9000'","handlingStrategy":"validation","validationCode":"const hasScheme = (url: string): boolean => /^https?:\\/\\//i.test(url);\n\nconst bucketURL = settings.get<string>('FileUpload_S3_BucketURL');\nif (bucketURL && !hasScheme(bucketURL)) {\n  // reject the save or prompt the admin instead of silently guessing https://\n  throw new Error(`FileUpload_S3_BucketURL \"${bucketURL}\" must include http:// or https://`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always store full endpoints (scheme + host + port) in BucketURL","Use http:// only for local test stores; https:// everywhere else","Store endpoint templates in one config source so schemes are not retyped per environment"],"tags":["s3","aws","endpoint","configuration","file-upload"],"backgroundTag":"invalid-endpoint-url","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}