Skip to content

Commit

Permalink
fix: null prefixes are acceptable
Browse files Browse the repository at this point in the history
  • Loading branch information
abose committed Apr 12, 2023
1 parent 6608bb0 commit 58c31c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/aws_s3_client_module.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function downloadObject(accessKeyId, secretAccessKey, region, bucketName, object
* @param secretAccessKey user specific unique identifier required for authentication
* @param region indicates the geographical server location (e.g us-east-1, eu-west-1a)
* @param bucketName uniquely identifies the bucket where the file should be uploaded
* @param prefix a string to narrow down to specific objects. Eg, to return all files in dir `a/b/`,
* @param prefix an optional string to narrow down to specific objects. Eg, to return all files in dir `a/b/`,
* pass in prefix as `a/b/`
* @param url suffix url to decide whether to upload the file to AWS S3 or LiNode Object Storage
* @returns listObjectResponse
Expand Down
6 changes: 3 additions & 3 deletions src/wasabi_storage_module.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ async function downloadFileFromBucket(accessKeyId, secretAccessKey, region, buck
* @param secretAccessKey user specific unique identifier required for authentication
* @param region indicates the geographical server location (e.g us-east-1, eu-west-1a)
* @param bucketName uniquely identifies the bucket where the file should be uploaded
* @param prefix a string to narrow down to specific objects. Eg, to return all files in dir `a/b/`,
* @param prefix an optional string to narrow down to specific objects. Eg, to return all files in dir `a/b/`,
* pass in prefix as `a/b/`
* @returns listObjectResponse
*/
async function listObjects(accessKeyId, secretAccessKey, region, bucketName, prefix) {
if (!region || !bucketName || !prefix) {
async function listObjects(accessKeyId, secretAccessKey, region, bucketName, prefix = undefined) {
if (!region || !bucketName) {
throw new Error("Invalid parameter value: accessToken, region, fileName " +
"and bucketName, prefix are required parameters");
}
Expand Down

0 comments on commit 58c31c0

Please sign in to comment.