Skip to content

Commit 72d65f7

Browse files
authored
Merge pull request #562 from ztyyLV/Jackson-branch
Jackson branch
2 parents 5c3abaf + 81212ae commit 72d65f7

File tree

1 file changed

+36
-35
lines changed

1 file changed

+36
-35
lines changed

info/api/Dynamsoft_FileUploader.md

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -342,12 +342,11 @@ DWObject.GenerateURLForUploadData(
342342

343343
## ServerUrl
344344

345+
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';`
346+
345347
**Syntax**
346348

347349
```typescript
348-
/**
349-
* 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';
350-
*/
351350
ServerUrl: string;
352351
```
353352

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

364363
## HttpHeader
365364

365+
Specifies headers in the the HTTP Post Request of the upload job. For example: `job.HttpHeader["Content-Type"] = "text/plain";`
366+
366367
**Syntax**
367368

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

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

389387
## SourceValue
390388

389+
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.
390+
391391
**Syntax**
392392

393393
```typescript
394-
/**
395-
* 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.
396-
*/
397394
SourceValue: object;
398395
```
399396

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

420417
## FormField
421418

419+
Specifies extra fields to be uploaded in the same HTTP post.
420+
422421
**Syntax**
423422

424423
```typescript
425-
/**
426-
* Specifies extra fields to be uploaded in the same HTTP post.
427-
*/
428424
FormField: object;
429425
```
430426

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

451447
## OnUploadTransferPercentage
452448

449+
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.
450+
453451
**Syntax**
454452

455453
```typescript
456-
/**
457-
* 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.
458-
* @argument obj A job object.
459-
* @argument sPercentage The percentage of the completion of the job.
460-
*/
461454
.OnUploadTransferPercentage = function(obj: Object , sPercentage: number){};
462455
```
463456

457+
**Parameters**
458+
459+
`obj`: A job object.
460+
461+
`sPercentage`: The percentage of the completion of the job.
462+
464463
**Availability**
465464

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

483482
## OnRunSuccess
484483

484+
The event is triggered when an upload job completes successfully.
485+
485486
**Syntax**
486487

487488
```typescript
488-
/**
489-
* The event is triggered when an upload job completes successfully.
490-
* @argument obj A job object.
491-
*/
492489
.OnRunSuccess = function(obj: Object){};
493490
```
494491

492+
**Parameters**
493+
494+
`obj`: A job object.
495+
495496
**Availability**
496497

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

512513
---
513514

514-
---
515-
516515
## OnRunFailure
517516

517+
The event is triggered when an upload job completes successfully.
518+
518519
**Syntax**
519520

520521
```typescript
521-
/**
522-
* The event is triggered when an upload job completes successfully.
523-
* @argument obj A job object.
524-
* @argument errorCode The error code.
525-
* @argument errorString The error string.
526-
*/
527522
.OnRunFailure = function(
528-
obj: Object
529-
errorCode: number,
530-
errorString: string
523+
obj: Object,
524+
errorCode: number,
525+
errorString: string
531526
){};
532527
```
533528

529+
**Parameters**
530+
531+
`obj`: A job object.
532+
533+
`errorCode`: The error code.
534+
535+
`errorString`: The error string.
536+
534537
**Availability**
535538

536539
<div class="availability"></div>
@@ -546,6 +549,4 @@ job.OnRunFailure = FileUpload_OnRunFailure;
546549
function FileUpload_OnRunFailure(obj, errorCode, errorString) {
547550
alert(errorString);
548551
}
549-
```
550-
551-
---
552+
```

0 commit comments

Comments
 (0)