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 | The custom callback function is used to process the response content |
payloadFieldName | Field Name |
origin | The domain name |
uploadSnapshotAPIPath | Pathname |
method | Request method |
- 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