Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions faq/failed-to-load-resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ In this case, if you are trying to access an application that integrates a versi
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.
- Method 3. <a href="{{site.about}}getsupport.html" target="_blank">Contact Dynamsoft</a> for a new MSI for client-side.

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

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

- 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. The following is an sample code:
```javascript
// Add the code in dynamsoft.webtwain.config.js file
Dynamsoft.DWT.ServiceCertUpdateURL= "https://demo.dynamsoft.com/DWT/Resources/dist/cert.zip";
Expand Down
71 changes: 36 additions & 35 deletions info/api/Dynamsoft_FileUploader.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,11 @@ DWObject.GenerateURLForUploadData(

## ServerUrl

Specifies the target of the HTTP Post Request of the upload job. This typically is a file on the server. For example: `job.ServerUrl = 'http://www.dynamsoft.com/ScanAndUpload/Actions/SaveToFile.aspx';`

**Syntax**

```typescript
/**
* Specifies the target of the HTTP Post Request of the upload job. This typically is a file on the server. For example: job.ServerUrl = 'http://www.dynamsoft.com/ScanAndUpload/Actions/SaveToFile.aspx';
*/
ServerUrl: string;
```

Expand All @@ -363,12 +362,11 @@ ServerUrl: string;

## HttpHeader

Specifies headers in the the HTTP Post Request of the upload job. For example: `job.HttpHeader["Content-Type"] = "text/plain";`

**Syntax**

```typescript
/**
* Specifies headers in the the HTTP Post Request of the upload job. For example: job.HttpHeader["Content-Type"] = "text/plain";
*/
HttpHeader: object;
```

Expand All @@ -388,12 +386,11 @@ By default, HttpHeader is an empty object. If left as it is, default headers are

## SourceValue

Specifies the files to be uploaded and the name for it. The files are specified by URLs which can be created with the method GenerateURLForUploadData. This object has a method Add to add file to the job.

**Syntax**

```typescript
/**
* Specifies the files to be uploaded and the name for it. The files are specified by URLs which can be created with the method GenerateURLForUploadData. This object has a method Add to add file to the job.
*/
SourceValue: object;
```

Expand All @@ -419,12 +416,11 @@ job.SourceValue.Add(url, fileName);

## FormField

Specifies extra fields to be uploaded in the same HTTP post.

**Syntax**

```typescript
/**
* Specifies extra fields to be uploaded in the same HTTP post.
*/
FormField: object;
```

Expand All @@ -450,17 +446,20 @@ job.FormField.Add("customField", "FormFieldValue");

## OnUploadTransferPercentage

The event is triggered during the execution of an upload job. It has a parameter which specifies the percentage of the completion of the job.

**Syntax**

```typescript
/**
* The event is triggered during the execution of an upload job. It has a parameter which specifies the percentage of the completion of the job.
* @argument obj A job object.
* @argument sPercentage The percentage of the completion of the job.
*/
.OnUploadTransferPercentage = function(obj: Object , sPercentage: number){};
```

**Parameters**

`obj`: A job object.

`sPercentage`: The percentage of the completion of the job.

**Availability**

<div class="availability"></div>
Expand All @@ -482,16 +481,18 @@ function FileUpload_ OnUploadTransferPercentage (obj, sPercentage){

## OnRunSuccess

The event is triggered when an upload job completes successfully.

**Syntax**

```typescript
/**
* The event is triggered when an upload job completes successfully.
* @argument obj A job object.
*/
.OnRunSuccess = function(obj: Object){};
```

**Parameters**

`obj`: A job object.

**Availability**

<div class="availability"></div>
Expand All @@ -511,26 +512,28 @@ function FileUpload_OnRunSuccess(obj) {

---

---

## OnRunFailure

The event is triggered when an upload job completes successfully.

**Syntax**

```typescript
/**
* The event is triggered when an upload job completes successfully.
* @argument obj A job object.
* @argument errorCode The error code.
* @argument errorString The error string.
*/
.OnRunFailure = function(
obj: Object
errorCode: number,
errorString: string
obj: Object,
errorCode: number,
errorString: string
){};
```

**Parameters**

`obj`: A job object.

`errorCode`: The error code.

`errorString`: The error string.

**Availability**

<div class="availability"></div>
Expand All @@ -546,6 +549,4 @@ job.OnRunFailure = FileUpload_OnRunFailure;
function FileUpload_OnRunFailure(obj, errorCode, errorString) {
alert(errorString);
}
```

---
```
Loading