GithubHelp home page GithubHelp logo

fleek-storage-js's People

Contributors

bhflm avatar dependabot[bot] avatar jsonsivar avatar lubert avatar matheusdaros avatar paymog avatar perfectmak avatar samuelea avatar studna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fleek-storage-js's Issues

Method to query pins with dates

Would be great if we can have a way to query pins with dates using the listFiles method, right now it just has bucket names to filter

svg problem

If i upload a svg pic with fleekStorgeJS, i can't display it.
However, if i upload a svg pic with Fleek Web App, it goes well.
I figure it might be contentType problem, but i can't custom contentType like what docs said based on the latest version of FleekStorgeJS code.
Hope you can fix this.

can anyone can resolve this issue Access denied in fleek storage

    at Request.extractError (/home/prabin/Documents/abc/storage/node_modules/aws-sdk/lib/services/s3.js:711:35)
    at Request.callListeners (/home/prabin/Documents/abc/storage/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.emit (/home/prabin/Documents/abc/storage/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/home/prabin/Documents/abc/storage/node_modules/aws-sdk/lib/request.js:686:14)
    at Request.transition (/home/prabin/Documents/abc/storage/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/home/prabin/Documents/abc/storage/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /home/prabin/Documents/abc/storage/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/home/prabin/Documents/abc/storage/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/home/prabin/Documents/abc/storage/node_modules/aws-sdk/lib/request.js:688:12)
    at Request.callListeners (/home/prabin/Documents/abc/storage/node_modules/aws-sdk/lib/sequential_executor.js:116:18) {
  **code: 'AccessDenied',
  region: null,
  time: 2023-01-30T08:26:18.522Z,
  requestId: '173F08B8015F93E4',
  extendedRequestId: undefined,
  cfId: undefined,
  statusCode: 403,
  retryable: false,
  retryDelay: 39.20758658911196**
}```

Internal Library Error while trying to upload a new file

I was trying to upload many "objects" to fleek and sometimes I receive this be cause may be request fail.

/Users/ww/git/project-fleek/node_modules/aws-sdk/lib/request.js:31
            throw err;
            ^

Error [TypeError]: Cannot read properties of null (reading 'ETag')
    at Request.<anonymous> (/Users/ww/git/project-fleek/node_modules/@fleekhq/fleek-storage-js/utils/upload-file.js:8:21)
    at Request.callListeners (/Users/ww/git/project-fleek/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.emit (/Users/ww/git/project-fleek/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/Users/ww/git/project-fleek/node_modules/aws-sdk/lib/request.js:686:14)
    at Request.transition (/Users/ww/git/project-fleek/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/Users/ww/git/project-fleek/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /Users/ww/git/project-fleek/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/Users/ww/git/project-fleek/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/Users/ww/git/project-fleek/node_modules/aws-sdk/lib/request.js:688:12)
    at Request.callListeners (/Users/ww/git/project-fleek/node_modules/aws-sdk/lib/sequential_executor.js:116:18) {
  code: 'TypeError',
  time: 2022-01-12T22:45:58.056Z
}

I don't know really to say. just reporting unexpected error may be

how to use this with orbit-db?

I want to configure my orbit-db with fleek storage so that my orbit-db data get stored on fleek's IPFS and can persist using fleek's pinning service.

try catch fails to catch errors

my code:
https://github.com/Aiaminm/fake123/blob/main/content/fleekupload.js

When some network error occurs, even using try catch error will cause the program to stop

`/workdir/node_modules/aws-sdk/lib/request.js:31
throw err;
^

Error [TypeError]: Cannot destructure property 'ETag' of 'data' as it is undefined.
at /workdir/node_modules/@fleekhq/fleek-storage-js/utils/stream-upload.js:17:13
at ManagedUpload.callback (/workdir/node_modules/s3-streaming-upload/src/index.js:70:7)
at ManagedUpload.cleanup (/workdir/node_modules/aws-sdk/lib/s3/managed_upload.js:635:10)
at Response. (/workdir/node_modules/aws-sdk/lib/s3/managed_upload.js:572:28)
at Request. (/workdir/node_modules/aws-sdk/lib/request.js:367:18)
at Request.callListeners (/workdir/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/workdir/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/workdir/node_modules/aws-sdk/lib/request.js:686:14)
at Request.transition (/workdir/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/workdir/node_modules/aws-sdk/lib/state_machine.js:14:12) {
code: 'TypeError',
time: 2022-06-23T13:06:11.242Z
}`

Someone help please I'm getting this error but I have no idea what it means

Deploy started at 7:09:11 PM 04/20/2021

7:09:12 PM 04/20/2021: Deploy started
7:09:15 PM 04/20/2021: Docker image: 'fleek/create-react-app'
7:09:15 PM 04/20/2021: Build command: 'yarn && yarn build'
7:09:15 PM 04/20/2021: Triggering build execution...
7:10:14 PM 04/20/2021: yarn install v1.22.5
7:10:14 PM 04/20/2021: [1/4] Resolving packages...
7:10:15 PM 04/20/2021: [2/4] Fetching packages...
7:10:25 PM 04/20/2021: error Command failed.
7:10:25 PM 04/20/2021: Exit code: 128
7:10:25 PM 04/20/2021: Command: git
7:10:25 PM 04/20/2021: Arguments: ls-remote --tags --heads ssh://[email protected]/ethereumjs/ethereumjs-abi.git
7:10:25 PM 04/20/2021: Directory: /workspace
7:10:25 PM 04/20/2021: Output:
7:10:25 PM 04/20/2021: Host key verification failed.
7:10:25 PM 04/20/2021: fatal: Could not read from remote repository.
7:10:25 PM 04/20/2021: Please make sure you have the correct access rights
7:10:25 PM 04/20/2021: and the repository exists.
7:10:25 PM 04/20/2021: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
7:11:15 PM 04/20/2021: Error occured during the build.

Decentralization of GH credentials

At the moment we are storing the GH keys associated to the team which has led to a problem of repositories syncs. We want the users to have their own credentials for GH and not use the teams one.

How to list files in folder?

I've created a folder with a file using the Fleek UI. I'm now trying to list this file programmatically but it's not clear how to use the SDK to do so. When I use the listFiles function I can see that the top level folder gets returned but I don't see a way to list files within a folder.

Here's an example folder structure:

paymog-team-bucket
    \--- test-folder
              \--- test-file.txt

Here's an example call to listFiles

    const files = await fleekStorage.listFiles({
        apiKey: String(yargs['key']),
        apiSecret: String(yargs['secret']),
        getOptions: [
            'bucket',
            'key',
            'hash',
            'publicUrl'
        ],
    })
    console.log(files)

This ends up printing

[
  {
    key: 'test-folder/',
    bucket: 'paymog-team-bucket',
    hash: 'QmcbEaggdDacn5QxQmXdt4K1eUDpXbx3L9tdHBSkjDR1NS',
    publicUrl: 'https://storageapi.fleek.co/paymog-team-bucket/test-folder/'
  }
]

How do I recurse into this folder? Is is possible to list files within a folder?

storageapi.fleek.co is inaccessible

Hi

Have started using fleekstorage and it has worked for a couple of days, but now I am getting an error when i try to call the api:

Inaccessible host: `storageapi.fleek.co' at port `443'. This service may not be available in the `us-east-1' region.
..
code: 'UnknownEndpoint',
  region: 'us-east-1',
  hostname: 'storageapi.fleek.co',
  retryable: true,
  originalError: Error: connect EHOSTUNREACH 2606:4700::6812:691:443
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1237:16) {
    errno: -113,
    code: 'NetworkingError',
    syscall: 'connect',
    address: '2606:4700::6812:691',
    port: 443,
    region: 'us-east-1',
    hostname: 'storageapi.fleek.co',
    retryable: true,
    time: 2022-09-29T09:31:45.287Z
  },
  time: 2022-09-29T09:31:45.287Z

I am not aware of any changes on my side since it worked. I am on the basic team plan (0.00 USD)

Any suggestions as to why this is happening now.

Warnings when installing package

I get the following warnings when installing the package:

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

yarn add v1.23.0-20210726.1745
[1/4] 🔍  Resolving packages...
warning @fleekhq/fleek-storage-js > [email protected]: no longer maintained
warning @fleekhq/fleek-storage-js > aws-sdk > [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning @fleekhq/fleek-storage-js > aws-sdk > url > [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning @fleekhq/fleek-storage-js > aws-sdk > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

Are there plans to resolve these warnings?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.