Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/earthstar/mod.browser.ts>MultiformatReplica#ingestAttachment

Storage for private, distributed, offline-first applications.
Go to Latest
method MultiformatReplica.prototype.ingestAttachment
Re-export
import { MultiformatReplica } from "https://deno.land/x/earthstar@v10.0.1/mod.browser.ts";

Ingest an attachment for a given document.

Parameters

format: FormatArg<F>
attachment: Uint8Array | ReadableStream<Uint8Array>
sourceId: "local" | string

Returns

Promise<true | false | ValidationError>

true (indicating it was upsert), false (indicating this attachment is already in storage), or a ValidationError (indicating something went wrong.)