FoxitPDFSDKforWeb  v10.0.0
Foxit PDF SDK for Web
SnapshotServer Class Reference

Custom screenshot image storage service. More...

Public Member Functions

 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...
 

Detailed Description

Custom screenshot image storage service.

var snapshotServer = new SnapshotServer({
uploadSnapshotAPIPath: 'snapshot/upload'
})

Member Function Documentation

◆ 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
payloadFieldNamestring - Field Name
originstring - The domain name
uploadSnapshotAPIPathstring - 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
blobBlob - image data
Returns
Promise<string> - image URL

Foxit Software Corporation Logo
@2024 Foxit Software Incorporated. All rights reserved.