@@ -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- */
4942Init (
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- */
8381CreateJob (): Job ;
8482
8583interface 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- */
195191Run (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- */
217215Cancel (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- */
238239CancelAllUpload (): 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- */
292282GenerateURLForUploadData (
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