| FoxitPDFSDKforWeb v11.0.4 Archives Foxit PDF SDK for Web

Public Member Functions | List of all members
SnapshotServer Class Reference
PDFViewCtrl

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

  blob | Blob - image data

Returns
  Promise<string> - image URL

@2025 Foxit Software Incorporated. All rights reserved.