FoxitPDFSDKforWeb  8.3.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
renderThe custom callback function is used to process the response content
payloadFieldNameField Name
originThe domain name
uploadSnapshotAPIPathPathname
methodRequest 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
blobBlob - image data
Returns
{Promise.<string>} - image URL

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