filebase-js's People
filebase-js's Issues
`storeBlob` returned CID but object was not stored in the bucket
We use storeBlob
to save JSON files to IPFS. Recently we had a case where several of our pins using storeBlob
returned CID but the file was not uploaded to bucket and not announced to DHT. We repinned the same content and it was eventually correctly uploaded to filebase s3 bucket and announced to DHT.
When looking at code, storeBlob
returns CID that is returned from encodeBlob
, so there's no guarantee that it was actually uploaded, and my immediate reaction was that this is the cause of this issue, however, after closer inspection, I can see that on the next like there's await FilebaseClient.storeCar(service, car, objectName || cid.toString())
, which should throw and error if CID is not returned from filebase server, which shows immediately go to catch
clause and call await blockstore.close()
instead of returning CID.
So I am puzzled how this happened that CID was returned but the file was not uploaded to the bucket, I was going to submit this simple fix (see screenshot below), but cannot understand why it would be needed as storeCar
promise should throw if there's no CID returned in carHeader.Metadata['cid']
Where is the code?
At official site i see that i have to install this package https://docs.filebase.com/ipfs/filebase-npm-package
Please clarify what is going on.
404 error when linking to API Documentation
In the README.md For more examples please see the API documentation. No page exsts.
Error when imported from ESM code
If you try to import this library from ESM code, you get a fatal error:
% npm i @filebase/client
npm WARN deprecated [email protected]: This module is deprecated, please upgrade to @multiformats/multiaddr-to-uri
npm WARN deprecated [email protected]: This module is deprecated, please upgrade to @multiformats/multiaddr
added 314 packages in 12s
29 packages are looking for funding
run `npm fund` for details
% echo 'import { FilebaseClient } from "@filebase/client";' > foo.mjs
% node foo.mjs
node:internal/errors:490
ErrorCaptureStackTrace(err);
^
Error [ERR_INVALID_PACKAGE_CONFIG]: Invalid package config /private/tmp/bar/node_modules/ipfs-car/dist/esm/package.json while importing /private/tmp/bar/node_modules/ipfs-car/dist/esm/pack/index.js. Unexpected token ''', "'{ "type" "... is not valid JSON
at new NodeError (node:internal/errors:399:5)
at getPackageConfig (node:internal/modules/esm/package_config:64:11)
at getPackageScopeConfig (node:internal/modules/esm/package_config:112:27)
at getPackageType (node:internal/modules/esm/resolve:690:25)
at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:54:12)
at defaultGetFormatWithoutErrors (node:internal/modules/esm/get_format:103:43)
at defaultResolve (node:internal/modules/esm/resolve:1094:13)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:837:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:418:18) {
code: 'ERR_INVALID_PACKAGE_CONFIG'
}
Node.js v19.5.0
I ran into this because the js-ipfs packages all went ESM last year and I was trying upgrading a project that depended on this library to use ESM to make it easier to use the latest js-ipfs packages.
web usage?
@jtsmedley it seems impossible to pass web's Blob instance in to the storeBlob
function. Any pointers?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.