BlobUrlManager
Defined in: src/lib/storage/opfs.ts:276
Manager for blob URLs to prevent memory leaks. Tracks active blob URLs and provides cleanup functionality.
Constructors
Constructor
new BlobUrlManager():
BlobUrlManager
Returns
BlobUrlManager
Accessors
size
Get Signature
get size():
number
Defined in: src/lib/storage/opfs.ts:322
Gets the count of active blob URLs.
Returns
number
Methods
createUrl()
createUrl(
fileId:string,blob:Blob):string
Defined in: src/lib/storage/opfs.ts:282
Creates a blob URL for a file and tracks it.
Parameters
| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
string
getUrl()
getUrl(
fileId:string):string|undefined
Defined in: src/lib/storage/opfs.ts:294
Gets the active blob URL for a file, if any.
Parameters
| Parameter | Type |
|---|---|
|
|
|
Returns
string | undefined
revokeAll()
revokeAll():
void
Defined in: src/lib/storage/opfs.ts:312
Revokes all tracked blob URLs.
Returns
void
revokeUrl()
revokeUrl(
fileId:string):void
Defined in: src/lib/storage/opfs.ts:301
Revokes a blob URL and removes it from tracking.
Parameters
| Parameter | Type |
|---|---|
|
|
|
Returns
void