Custom screenshot image storage service.
More...
|
| constructor ({ render=_=> _, payloadFieldName='file', origin='', uploadSnapshotAPIPath, method='POST' }={}) |
| Create a SnapshotServer. More...
|
|
| uploadImage (imageData) |
| Upload image blob data to the snapshot server, and then returns a same-origin image URL, which can be used to break some browser's limitations. More...
|
|
Custom screenshot image storage service.
uploadSnapshotAPIPath: 'snapshot/upload'
})
◆ constructor()
SnapshotServer::constructor |
( |
|
{ render=_=> _, payloadFieldName='file', origin='', uploadSnapshotAPIPath, method='POST' } = {} | ) |
|
|
inline |
Create a SnapshotServer.
- Parameters
-
render | (responseText: string) => string - The custom callback function is used to process the response content |
payloadFieldName | string - Field Name |
origin | string - The domain name |
uploadSnapshotAPIPath | string - Pathname |
[method='POST'] | string - Request method 'POST'|'PUT' |
- Since
- 8.2.0
◆ uploadImage()
SnapshotServer::uploadImage |
( |
|
imageData | ) |
|
|
inline |
Upload image blob data to the snapshot server, and then returns a same-origin image URL, which can be used to break some browser's limitations.
- Parameters
-
- Returns
- Promise<string> - image URL