Methods
# async deleteInvestigationImages(investigationId) → {Promise.<number>}
Delete all images for a specific investigation.
Parameters:
| Name | Type | Description |
|---|---|---|
investigationId |
string
|
The investigation ID. |
Number of files deleted.
Promise.<number>
# async deleteObjectImage(imageUrl) → {Promise.<boolean>}
Delete an object image from GCS.
Parameters:
| Name | Type | Description |
|---|---|---|
imageUrl |
string
|
The public URL of the image to delete. |
True when deleted successfully.
Promise.<boolean>
# async getImageMetadata(imageUrl) → {Promise.<(FileMetadata|null)>}
Get image metadata.
Parameters:
| Name | Type | Description |
|---|---|---|
imageUrl |
string
|
The public URL of the image. |
File metadata response.
Promise.<(FileMetadata|null)>
# async healthCheck() → {Promise.<boolean>}
Health check for GCS connection.
True if GCS is accessible.
Promise.<boolean>
# async imageExists(imageUrl) → {Promise.<boolean>}
Check if an image exists in GCS.
Parameters:
| Name | Type | Description |
|---|---|---|
imageUrl |
string
|
The public URL of the image. |
True if the file exists.
Promise.<boolean>
# async uploadObjectImage(investigationId, objectId, base64Image) → {Promise.<string>}
Upload an object image to GCS with resizing and compression.
Parameters:
| Name | Type | Description |
|---|---|---|
investigationId |
string
|
The investigation ID. |
objectId |
string
|
The object ID. |
base64Image |
string
|
Base64 encoded image string. |
The public URL of the uploaded image.
Promise.<string>