Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

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

Earthstar is a tool for private, undiscoverable, offline-first networks.
Go to Latest
method MultiformatReplica.prototype.ingestAttachment
Re-export
import { MultiformatReplica } from "https://deno.land/x/earthstar@v10.0.0/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.)