@pod-os/core / PictureGateway
Class: PictureGateway
Defined in: picture/PictureGateway.ts:9
Constructors
Constructor
new PictureGateway(
store,fileFetcher):PictureGateway
Defined in: picture/PictureGateway.ts:10
Parameters
store
fileFetcher
Returns
PictureGateway
Methods
uploadAndAddPicture()
uploadAndAddPicture(
thing,pictureFile):ResultAsync\<NewFile,NetworkProblem|HttpProblem>
Defined in: picture/PictureGateway.ts:24
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
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