@pod-os/core / FileGateway
Defined in: files/FileGateway.ts:13
Gateway for file-related operations on Solid Pods and the store.
0.24.0
new FileGateway(
store,fileFetcher):FileGateway
Defined in: files/FileGateway.ts:14
FileGateway
uploadAndLinkFile(
thing,predicateUri,fileToUpload):ResultAsync<NewFile,NetworkProblem|HttpProblem>
Defined in: files/FileGateway.ts:29
Uploads a file and associates it with a thing. The container is automatically derived from the thing's URI. Uses schema:image as the predicate.
The thing to add the file to
string
The URI of the predicate to use
File
The file to upload
ResultAsync<NewFile, NetworkProblem | HttpProblem>
Result with the uploaded metadata (url, name, contentType) or error