You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I may be missing some context here, but fs.openAsBlob() currently creates the file-backed Blob synchronously inside its implementation and then wraps it in a Promise.
A previous attempt in #49759 also proposed openAsBlobSync(), but it bundled that with changes to the existing API, and a CHANGES_REQUESTED review opposing those changes remained unresolved.
It might also be worth confirming whether the current Promise-returning API is considered stable.
Yes, the current API is stable and won't be changed.
When I first introduced openAsBlob(...), the original impl was sync but I was asked to make it return a promise. I'd be open to a openAsBlobSync addition. PRs welcome.
Activity
greenheadHQ commentedon Aug 27, 2026
Hi, I may be missing some context here, but
fs.openAsBlob()currently creates the file-backed Blob synchronously inside its implementation and then wraps it in a Promise.A previous attempt in #49759 also proposed
openAsBlobSync(), but it bundled that with changes to the existing API, and aCHANGES_REQUESTEDreview opposing those changes remained unresolved.It might also be worth confirming whether the current Promise-returning API is considered stable.
jasnell commentedon Aug 27, 2026
Yes, the current API is stable and won't be changed.
When I first introduced
openAsBlob(...), the original impl was sync but I was asked to make it return a promise. I'd be open to aopenAsBlobSyncaddition. PRs welcome.[-]Can `fs.openAsBlob` be sync?[/-][+]Sync alternative to `fs.openAsBlob`[/+]fs: add openAsBlobSync
fs: add openAsBlobSync