Skip to content

Commit

Permalink
Add let (#50)
Browse files Browse the repository at this point in the history
* Add let

* Add note about browser use in readme
  • Loading branch information
jsonsivar authored Jul 21, 2022
1 parent 743c797 commit 99f3e7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# Fleek Storage Js
Fleek Storage Js is an SDK to interact with Fleek Storage.

# Installation
The package can be installed through npm.

`npm install @fleekhq/fleek-storage-js`

It can also be installed through yarn.
:exclamation: Please do not use this package directly in the browser. Your API secret will be visible to users of that page. If you need to make requests from the client side, please use an S3 SDK directly with pre-signed urls: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-presigned-url.html.

`yarn add @fleekhq/fleek-storage-js`

Expand Down Expand Up @@ -186,4 +181,4 @@ const myFile = await fleekStorage.getFileFromHash({
|param |type |description |
|-: |- |- |
| hash | String | The hash of the requested file |
| getFileFromHashOptions | Array, optional, defaults to [] | An array specifying additional options when it comes to fetching by hash. Possible values for the array includes `buffer` (this returns the whole file at once instead of chunks) |
| getFileFromHashOptions | Array, optional, defaults to [] | An array specifying additional options when it comes to fetching by hash. Possible values for the array includes `buffer` (this returns the whole file at once instead of chunks) |
2 changes: 2 additions & 0 deletions methods/listFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ const listFiles = async ({
const files = await getFileList(s3, bucketName, prefix);

const promises = files.map(async (key, index) => {
let hash;

if (getOptions.includes(GET_OPTIONS.HASH)) {
hash = await getHashFromKey(bucketName, key);
}
Expand Down

0 comments on commit 99f3e7c

Please sign in to comment.