Closed abudaan closed 7 months ago
Yes, you are right. I am reverting to storing the selected bucket in the local state of the storage/adapter instance
I am implementing overloaded methods like this:
abstract listFiles(bucketName: string, numFiles?: number): Promise<ResultObjectFiles>;
abstract listFiles(numFiles?: number): Promise<ResultObjectFiles>;
abstract listFiles(arg1?: number | string, arg2?: number): Promise<ResultObjectFiles>;
Works pretty well with code hinting in vscode.
fixed in 2.1.0
I'd expect that if I've specified the bucket in the URL of the storage setup then that's the ONLY bucket I can access through that particular storage instance (credentials are likely tied to that bucket anyway). At the very least it should be used as the default if I omit the bucket name in later storage API calls. If I don't specify the bucket in the storage constructor then it makes sense to require it on every later API call.
Secondly the changes in the URL format, was there a reason behind diverging away from the more known s3://buckname/path/to/object type URIs that the AWS cli supports?
Originally posted by @headlessme in https://github.com/tweedegolf/storage-abstraction/issues/46#issuecomment-1900322465