Skip to content

@pod-os/core


@pod-os/core / PictureGateway

Class: PictureGateway

Defined in: picture/PictureGateway.ts:9

Gateway for picture-related operations on Solid Pods and the store.

Constructors

Constructor

new PictureGateway(attachmentGateway): PictureGateway

Defined in: picture/PictureGateway.ts:10

Parameters

attachmentGateway

FileGateway

Returns

PictureGateway

Methods

uploadAndAddPicture()

uploadAndAddPicture(thing, pictureFile): ResultAsync\<NewFile, NetworkProblem | HttpProblem>

Defined in: picture/PictureGateway.ts:21

Uploads a picture file and associates it with a thing. The container is automatically derived from the thing's URI. Uses schema:image as the predicate.

Parameters

thing

Thing

The thing to add the picture to

pictureFile

File

The picture file to upload

Returns

ResultAsync\<NewFile, NetworkProblem | HttpProblem>

Result with the uploaded picture metadata (url, name, contentType) or error