Browse modulesStorageInterfaces
Interface: FileStore
Defined in: server/forms/deps.ts:22
Port describing the file-storage backend the forms feature needs.
Consumers implement this against S3, GCS, local disk, etc. Only a few
operations are required — uploads go through a signed-URL flow and
downloads go through getDownloadUrl.
Methods
generateUploadUrl()
generateUploadUrl(input: {
actorId: string;
contentType: string;
context: string;
filename: string;
}): Promise<{
fields?: Record<string, string>;
fileId: string;
uploadUrl: string;
}>;Defined in: server/forms/deps.ts:23
Parameters
| Parameter | Type |
|---|---|
input | { actorId: string; contentType: string; context: string; filename: string; } |
input.actorId | string |
input.contentType | string |
input.context | string |
input.filename | string |
Returns
Promise<{
fields?: Record<string, string>;
fileId: string;
uploadUrl: string;
}>
getDownloadUrl()
getDownloadUrl(fileId: string): Promise<string>;Defined in: server/forms/deps.ts:38
Parameters
| Parameter | Type |
|---|---|
fileId | string |
Returns
Promise<string>
getMetadata()?
optional getMetadata(fileId: string): Promise<{
contentType: string;
filename: string;
sizeBytes: number;
}>;Defined in: server/forms/deps.ts:39
Parameters
| Parameter | Type |
|---|---|
fileId | string |
Returns
Promise<{
contentType: string;
filename: string;
sizeBytes: number;
}>
verifyOwnership()
verifyOwnership(input: {
actorId: string;
context: string;
fileIds: string[];
}): Promise<{
verified: string[];
}>;Defined in: server/forms/deps.ts:33
Parameters
| Parameter | Type |
|---|---|
input | { actorId: string; context: string; fileIds: string[]; } |
input.actorId | string |
input.context | string |
input.fileIds | string[] |
Returns
Promise<{
verified: string[];
}>