mkdir hello-filebase
cd hello-filebase
main.js
that is stored in your hello-filebase
folder.filebase-IPFS
.main.js
code, add the following line, replacing the filebase-bucket-name
with your bucket name, and object-name
with the file name for your object to be uploaded.Upload("filebase-bucket-name", "object-name");
npm install aws-sdk
npm install dotenv
.env
with the following content:AWS_ACCESS_KEY_ID=FILEBASE_ACCESS_KEY
AWS_SECRET_ACCESS_KEY=FILEBASE_SECRET_KEY
FILEBASE_ACCESS_KEY
and FILEBASE_SECRET_KEY
.node main.js
main.js
file that calls the Upload function with the following line:Download("filebase-bucket-name", "object-name");