fleek API

node v14.20.1
version: 3.0.1
endpointsharetweet
refer to https://blog.fleek.co/posts/guide-to-fleek-storage-js to create a API key
const fleek = require('@fleekhq/fleek-storage-js');
const myFile = 'test'
const input = { apiKey: 'suZsEXpsXlHtrCnme2wNRA==', apiSecret: 'EMcDWvx3/Mjb3SfaGJiiHJPm0d9EfTcY87+9dwjI1mY=', key: `my-folder/my-file-name`, data: myFile, }; const result = await fleek.upload(input);
const input2 = { apiKey: 'suZsEXpsXlHtrCnme2wNRA==', apiSecret: 'EMcDWvx3/Mjb3SfaGJiiHJPm0d9EfTcY87+9dwjI1mY=', key: `my-folder/my-file-name`, getOptions: ['hash', 'data', 'publicUrl', 'key'] }; const result2 = await fleek.get(input2);
more docs -> https://docs.fleek.co/storage/fleek-storage-js/
await fleek.listFiles(input2);
Loading…

no comments

    sign in to comment