Classes
Methods
# async avatarExists(avatarUrl) → {Promise.<boolean>}
Check if an avatar exists in GCS.
Parameters:
| Name | Type | Description |
|---|---|---|
avatarUrl |
string
|
The public URL of the avatar. |
True if the file exists.
Promise.<boolean>
# async deleteAvatar(avatarUrl) → {Promise.<boolean>}
Delete an avatar from GCS.
Parameters:
| Name | Type | Description |
|---|---|---|
avatarUrl |
string
|
The public URL of the avatar to delete. |
True when deleted successfully.
Promise.<boolean>
# async deleteUserAvatars(userId) → {Promise.<number>}
Delete all avatars for a specific user.
Parameters:
| Name | Type | Description |
|---|---|---|
userId |
string
|
The user ID. |
Number of files deleted.
Promise.<number>
# async getAvatarMetadata(avatarUrl) → {Promise.<(FileMetadata|null)>}
Get avatar metadata.
Parameters:
| Name | Type | Description |
|---|---|---|
avatarUrl |
string
|
The public URL of the avatar. |
File metadata response.
Promise.<(FileMetadata|null)>
# async healthCheck() → {Promise.<boolean>}
Health check for GCS connection.
True if GCS is accessible.
Promise.<boolean>
# async uploadAvatar(userId, base64Image) → {Promise.<string>}
Upload an avatar image to GCS with resizing and compression.
Parameters:
| Name | Type | Description |
|---|---|---|
userId |
string
|
The user ID. |
base64Image |
string
|
Base64 encoded image string. |
The public URL of the uploaded avatar.
Promise.<string>