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

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

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

Returns the given array of documents with a new attachment property merged in. The value of this property can be:

  • DocAttachment
  • undefined (the associated document can have an attachment, but we don't have a copy)
  • ValidationError (the associated document can't have an attachment)

Parameters

docs: FormatDocType<F>[]
optional
formats: FormatsArg<F>