Hashes and uploads bytes via the chosen storage backend (a no-op for inline), returning an un-added Blob object. The caller is responsible for adding it to the database.
bytes
inline
Optional
const blob = yield* Blob.fromBytes(bytes, { type: 'image/png' });yield* Database.add(blob); Copy
const blob = yield* Blob.fromBytes(bytes, { type: 'image/png' });yield* Database.add(blob);
Async; O(size) to hash, plus the backend upload (a no-op for inline storage).
Hashes and uploads
bytesvia the chosen storage backend (a no-op forinline), returning an un-added Blob object. The caller is responsible for adding it to the database.