Fix: S3 key encoding env quote stripping test assertions remove unused import
This commit is contained in:
@@ -85,9 +85,11 @@ class S3Source {
|
||||
* Download an object's content as string
|
||||
*/
|
||||
async getObject(key) {
|
||||
// Encode each path segment separately to preserve /
|
||||
const encodedKey = key.split('/').map(s => encodeURIComponent(s)).join('/');
|
||||
const path = this.config.endpoint
|
||||
? `/${this.config.bucket}/${encodeURIComponent(key)}`
|
||||
: `/${encodeURIComponent(key)}`;
|
||||
? `/${this.config.bucket}/${encodedKey}`
|
||||
: `/${encodedKey}`;
|
||||
const response = await this.requestRaw('GET', path, '');
|
||||
// Auto-decompress if gzipped
|
||||
if (key.endsWith('.gz') || key.endsWith('.gzip')) {
|
||||
|
||||
Reference in New Issue
Block a user