Skip to content

Commit 6d1a22b

Browse files
committed
doc(readme): update doc for v1.1.0 release
1 parent df68eeb commit 6d1a22b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,24 +276,24 @@ const data: any = {
276276
type: [File.type], // type property of the current file to upload
277277
sha256Checksum?: [checksum] // generated only if config.addChecksum === true
278278
},
279-
file: [File], // the file object to upload which is the binary data. For a file upload, it's the file itself and for chunks upload, it's the chunk part split as the sequence described below.
279+
[additionalFormData.fieldName]?: [additionalFormData.data], // generated only if `additionalFormData` object is passed in parameter of the upload method
280280
chunkData?: { // generated only if config.useChunks === true
281281
sequence: [number], // the current chunk number
282282
totalChunks: [number], // the total number of chunks
283283
startByte: [number], // the start byte number of the chunk
284284
endByte: [number] // the end byte number of the chunk
285285
},
286-
[additionalFormData.fieldName]?: [additionalFormData.data] // generated only if `additionalFormData` object is passed in parameter of the upload method
286+
file: [File], // the file object to upload which is the binary data. For a file upload, it's the file itself and for chunks upload, it's the chunk part split as the sequence described in chunkData
287287
};
288288

289289
// FormData instance
290290
const formData = new FormData();
291291

292292
formData.append('rxFileUploadId', data.rxFileUploadId);
293293
formData.append('fileData', JSON.stringify(data.fileData));
294-
formData.append('file', data.file);
295-
formData.append('chunkData', JSON.stringify(data.chunkData)); // optional
296294
formData.append('[additionalFormData.fieldName]', JSON.stringify(data['[additionalFormData.fieldName]'])); // optional
295+
formData.append('chunkData', JSON.stringify(data.chunkData)); // optional
296+
formData.append('file', data.file);
297297
```
298298

299299
[back to top](#table-of-contents)

0 commit comments

Comments
 (0)