Skip to main content
Module

x/earthstar/src/entries/universal.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.0.2/src/entries/universal.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>