Skip to content

Commit b7cf235

Browse files
author
Ivan Mirić
committed
Document ArrayBuffer support for http.file()
Part of #233
1 parent 15818b5 commit b7cf235

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/data/markdown/docs/02 javascript api/07 k6-http/10-file- data- -filename-- -contentType- -.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ description: 'Create a file object that is used for building multi-part requests
55

66
Create a file object that is used for building [Multipart requests (file uploads)](/examples/data-uploads#multipart-request-uploading-a-file).
77

8-
| Parameter | Type | Description |
9-
| ----------- | -------------- | -------------------------------------------------------------------------------- |
10-
| data | string / bytes | An array or object containing requests, in string or object form. |
11-
| filename | string | The filename to specify for this field (or "part") of the multipart request. |
12-
| contentType | string | The content type to specify for this field (or "part") of the multipart request. |
8+
| Parameter | Type | Description |
9+
| ----------- | -------------------- | -------------------------------------------------------------------------------- |
10+
| data | string / ArrayBuffer | File data as string or an `ArrayBuffer` object. |
11+
| filename | string | The filename to specify for this field (or "part") of the multipart request. |
12+
| contentType | string | The content type to specify for this field (or "part") of the multipart request. |
1313

1414
### Returns
1515

src/data/markdown/docs/02 javascript api/07 k6-http/60-FileData.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ _FileData_ is an object for wrapping data representing a file when doing
77
[multipart requests (file uploads)](/examples/data-uploads#multipart-request-uploading-a-file).
88
You create it by calling [http.file( data, [filename], [contentType] )](/javascript-api/k6-http/file-data-filename-contenttype).
99

10-
| Name | Type | Description |
11-
| --------------------- | -------------- | ----------------------------------------------------------------- |
12-
| FileData.data | string / bytes | The bytes representing the file contents. |
13-
| FileData.content_type | string | The content type that will be specified in the multipart request. |
14-
| FileData.filename | string | The filename that will be specified in the multipart request. |
10+
| Name | Type | Description |
11+
| --------------------- | -------------------- | ------------------------------------------------------------------------ |
12+
| FileData.data | string / ArrayBuffer | File data as string or an `ArrayBuffer` object. |
13+
| FileData.content_type | string | The content type that will be specified in the multipart request. |
14+
| FileData.filename | string | The filename that will be specified in the multipart request. |
1515

1616
### Example
1717

0 commit comments

Comments
 (0)