You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support for adding empty folder in s3x does not work like it does in s3 when using AWS SDK /Rest API. When trying this in s3x gateway the client request hangs and times out.
Change/Fix: S3x can emulate the same empty folder feature as S3 by creating a placeholder .keep file in the requested location so that it can handle empty folders and subfolders.
Current Behavior
The s3x gateway times out or hangs when trying to call it with the above SDK code for empty folder.
The gateway does not support empty folders and subfolders in location, if improvement is added users could create folders and subfolders in s3x like they can in the s3 SDK client.
Possible Solution
Recursively create .keep files per locations in folder/subfolders to emulate empty folders.
Steps to Reproduce (for bugs)
Boot up the gateway via: minio gateway s3x
From a nodejs client try running this code: (can also be replicated with REST API) var AWS = require('aws-sdk'); var s3 = new AWS.S3({ accessKeyId: 'minio' , secretAccessKey: 'miniostorage' , endpoint: 'http://localhost:9000' , ... }); s3.putObject({ Bucket: 'my-bucket', Key: 'empty-folder/', }, (...args) => { console.log(args); });
Gateway process hangs in terminal.
Context
Trying to implement a folder like browser using s3x for IPFS that has parity with S3 SDK and can also work for clients using existing S3 storage.
Support for adding empty folder in s3x does not work like it does in s3 when using AWS SDK /Rest API. When trying this in s3x gateway the client request hangs and times out.
Expected Behavior
The AWS S3 SDK has support for empty folders, which is done via a
/
suffix at the end of the key name and a byte 0 file is added to the location to represent an empty folder.Reference: https://stackoverflow.com/questions/19459893/how-to-create-folder-or-key-on-s3-using-aws-sdk-for-node-js
Calling code in NodeJs AWS SDK:
s3.putObject({ Bucket: 'my-bucket', Key: 'my-empty-folder/' }, (...args) => { console.log(args); });
Change/Fix: S3x can emulate the same empty folder feature as S3 by creating a placeholder .keep file in the requested location so that it can handle empty folders and subfolders.
Current Behavior
The s3x gateway times out or hangs when trying to call it with the above SDK code for empty folder.
The gateway does not support empty folders and subfolders in location, if improvement is added users could create folders and subfolders in s3x like they can in the s3 SDK client.
Possible Solution
Recursively create
.keep
files per locations in folder/subfolders to emulate empty folders.Steps to Reproduce (for bugs)
var AWS = require('aws-sdk'); var s3 = new AWS.S3({ accessKeyId: 'minio' , secretAccessKey: 'miniostorage' , endpoint: 'http://localhost:9000' , ... }); s3.putObject({ Bucket: 'my-bucket', Key: 'empty-folder/', }, (...args) => { console.log(args); });
Context
Trying to implement a folder like browser using s3x for IPFS that has parity with S3 SDK and can also work for clients using existing S3 storage.
Your Environment
uname -a
): Darwin Kernel Version 18.7.0: Mon Feb 10 21:08:45 PST 2020; root:xnu-4903.278.28~1/RELEASE_X86_64 x86_64The text was updated successfully, but these errors were encountered: