Skip to content

Commit 79d0285

Browse files
authored
Merge pull request #553 from ztyyLV/Jackson-branch
Jackson branch
2 parents 5c6d0a2 + c0a4c04 commit 79d0285

File tree

2 files changed

+66
-52
lines changed

2 files changed

+66
-52
lines changed

faq/failed-to-load-resource.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,25 @@ In this case, if you are trying to access an application that integrates a versi
3333
Note: the new certificate from Dynamsoft will expire on December 8th, 2023. This means you will need to update the certificate again after this certificate expires.
3434
- Method 3. <a href="{{site.about}}getsupport.html" target="_blank">Contact Dynamsoft</a> for a new MSI for client-side.
3535

36+
- For v17.2 or higher versions, use the new API <a href="{{site.info}}api/Dynamsoft_WebTwainEnv.html#updatecert" target="_blank">UpdateCert</a> to automatically update the client side certificate before it expires.
3637

38+
- If you want to automatically update the certificate, please add following code:
3739

38-
- For v17.2 or higher versions, use the new API <a href="{{site.info}}api/Dynamsoft_WebTwainEnv.html#updatecert" target="_blank">UpdateCert</a> to automatically update the client side certificate before it expires.
40+
```javascript
41+
// Add the code in dynamsoft.webtwain.configure.js file
42+
Dynamsoft.DWT.ServiceCertUpdateURL= "https://demo.dynamsoft.com/DWT/Resources/dist/cert.zip";
43+
```
44+
```javascript
45+
// Add the code in dynamsoft.webtwain.install.js file
46+
Dynamsoft.DWT.UpdateCert(
47+
Dynamsoft.DWT.ServiceCertUpdateURL,
48+
function () {
49+
    },
50+
    function (errorCode, errorString) {
51+
        console.log(errorString);
52+
    }
53+
);
54+
```
3955

4056
<!--
4157

info/api/Dynamsoft_FileUploader.md

Lines changed: 49 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,29 @@ permalink: /info/api/Dynamsoft_FileUploader.html
3434

3535
## Init
3636

37+
Initialize and create a FileUploader instance.
38+
3739
**Syntax**
3840

3941
```typescript
40-
/**
41-
* Initialize and create a FileUploader instance.
42-
* @param URL Specify a path to retrieve the FileUploader library.
43-
* @param successCallback A callback function that is executed if the request succeeds.
44-
* @param failureCallback A callback function that is executed if the request fails.
45-
* @argument uploadManager A FileUploader instance.
46-
* @argument errorCode The error code.
47-
* @argument errorString The error string.
48-
*/
4942
Init(
5043
URL: string,
51-
successCallback: (
52-
uploadManager: UploadManager
53-
) => void,
54-
failureCallback: (
55-
errorCode: number,
56-
errorString: string
57-
) => void
44+
successCallback: (uploadManager: UploadManager) => void,
45+
failureCallback: (errorCode: number, errorString: string) => void
5846
): void;
5947
```
6048

49+
**Parameters**
50+
51+
`URL`: Specify a path to retrieve the FileUploader library.
52+
53+
`successCallback`: A callback function that is executed if the request succeeds.
54+
- `uploadManager`: A FileUploader instance.
55+
56+
`failureCallback`: A callback function that is executed if the request fails.
57+
- `errorCode`: The error code.
58+
- `errorString`: The error string.
59+
6160
**Availability**
6261

6362
<div class="availability"></div>
@@ -74,12 +73,11 @@ The FileUploader library is installed with Dynamsoft Service by default, therefo
7473

7574
## CreateJob
7675

76+
Create an upload job.
77+
7778
**Syntax**
7879

7980
```typescript
80-
/**
81-
* Create an upload job.
82-
*/
8381
CreateJob(): Job;
8482

8583
interface Job {
@@ -185,16 +183,18 @@ interface FormField {
185183

186184
## Run
187185

186+
Start uploading (processing the specified job).
187+
188188
**Syntax**
189189

190190
```typescript
191-
/**
192-
* Start uploading (processing the specified job).
193-
* @param job Specify the job.
194-
*/
195191
Run(job: Job): boolean;
196192
```
197193

194+
**Parameters**
195+
196+
`job`: Specify the job.
197+
198198
**Availability**
199199

200200
<div class="availability"></div>
@@ -207,16 +207,18 @@ Run(job: Job): boolean;
207207

208208
## Cancel
209209

210+
Cancel a job.
211+
210212
**Syntax**
211213

212214
```typescript
213-
/**
214-
* Cancel a job.
215-
* @param job Specify the job.
216-
*/
217215
Cancel(job: Job): boolean;
218216
```
219217

218+
**Parameters**
219+
220+
`job`: Specify the job.
221+
220222
**Availability**
221223

222224
<div class="availability"></div>
@@ -229,12 +231,11 @@ Cancel(job: Job): boolean;
229231

230232
## CancelAllupload
231233

234+
Cancel all jobs.
235+
232236
**Syntax**
233237

234238
```typescript
235-
/**
236-
* Cancel all jobs.
237-
*/
238239
CancelAllUpload(): boolean;
239240
```
240241

@@ -246,8 +247,6 @@ CancelAllUpload(): boolean;
246247
|ActiveX|H5(Windows)|H5(macOS/TWAIN)|H5(macOS/ICA)|H5(Linux)|
247248
| not supported | v17.2+ | v17.2+ | v17.2+ | v17.2+ |
248249

249-
---
250-
251250
**Usage notes**
252251

253252
`Cancel()` or `CancleAllUpload()` should be called in the event [OnUploadTransferPercentage](#onuploadtransferpercentage).
@@ -275,33 +274,32 @@ Dynamsoft.FileUploader.Init(
275274

276275
## GenerateURLForUploadData
277276

277+
Generates a URL that will be used by the upload module to fetch the file/data to upload.
278+
278279
**Syntax**
279280

280281
```typescript
281-
/**
282-
* Generates a URL that will be used by the upload module to fetch the file/data to upload.
283-
* @param Number[] The indices of the images in the buffer. The index is 0-based.
284-
* @param EnumDWT_ImageType The format in which you'd like the images to be uploaded.
285-
* @param successCallback A callback function triggered when the operation succeeds. This function will return the result URL.
286-
* @param failureCallback A callback function triggered when the operation fails.
287-
* @argument resultURL The result URL.
288-
* @argument errorCode The error code.
289-
* @argument errorString The error string.
290-
291-
*/
292282
GenerateURLForUploadData(
293-
Number[]: array,
283+
Indexes: Number[],
294284
EnumDWT_ImageType: Dynamsoft.DWT.EnumDWT_ImageType | number,
295-
successCallback: (
296-
resultURL: resultURL
297-
) => void,
298-
failureCallback: (
299-
errorCode: number,
300-
errorString: string
301-
) => void
285+
successCallback: (resultURL: resultURL) => void,
286+
failureCallback: (errorCode: number, errorString: string) => void
302287
): void;
303288
```
304289

290+
**Parameters**
291+
292+
`Indexes`: The indices of the images in the buffer. The index is 0-based.
293+
294+
`EnumDWT_ImageType`: The format in which you'd like the images to be uploaded. Please refer to [EnumDWT_ImageType]({{site.info}}api/Dynamsoft_Enum.html#dynamsoftdwtenumdwt_imagetype).
295+
296+
`successCallback`: A callback function triggered when the operation succeeds. This function will return the result URL.
297+
- `resultURL`: The result URL.
298+
299+
`failureCallback`: A callback function triggered when the operation fails.
300+
- `errorCode`: The error code.
301+
- `errorString`: The error string.
302+
305303
**Availability**
306304

307305
<div class="availability"></div>

0 commit comments

Comments
 (0)