@pod-os/core / AttachmentGateway
Defined in: attachments/AttachmentGateway.ts:11
Gateway for attachment-related operations on Solid Pods and the store.
0.24.0
new AttachmentGateway(
fileGateway):AttachmentGateway
Defined in: attachments/AttachmentGateway.ts:12
AttachmentGateway
uploadAndAddAttachment(
thing,attachmentFile):ResultAsync<NewFile,NetworkProblem|HttpProblem>
Defined in: attachments/AttachmentGateway.ts:23
Uploads an attachment file and associates it with a thing. The container is automatically derived from the thing's URI. Uses flow:attachment as the predicate.
The thing to add the attachment to
File
The attachment file to upload
ResultAsync<NewFile, NetworkProblem | HttpProblem>
Result with the uploaded attachment metadata (url, name, contentType) or error