Skip to content

Commit 19af83c

Browse files
authored
DOCS-1353: Add file_extension parameter for binary upload (#2162)
1 parent 14ded55 commit 19af83c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/program/apis/data-client.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ Uploaded binary data can be found under the **Images**, **Point clouds**, or **F
194194
- `method_name` [(str)](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str): Name of the method used to capture the data.
195195
- `tags` [(Optional[List[str]])](https://docs.python.org/3/library/stdtypes.html#typesseq-list): Optional list of [image tags](/manage/data/label/#image-tags) to allow for tag-based data filtering when retrieving data.
196196
- `data_request_times` [(Optional[Tuple[datetime.datetime, datetime.datetime]])](https://docs.python.org/3/library/stdtypes.html#tuples): Optional tuple containing [`datetime`](https://docs.python.org/3/library/datetime.html) objects denoting the times this data was requested and received by the appropriate sensor.
197+
- `file_extension` [(Optional[str])](https://docs.python.org/3/library/typing.html#typing.Optional): The file extension of binary data including the period. For example, `".jpg"`, `".png"`, or `".pcd"`. Specify this to route the binary data to its corresponding mime type in storage in the [Viam app](https://app.viam.com).
197198

198199
**Returns**:
199200

@@ -211,6 +212,7 @@ file_id = await data_client.binary_data_capture_upload(
211212
method_parameters=None,
212213
tags=["tag_1", "tag_2"],
213214
data_request_times=[time_requested, time_received],
215+
file_extension=".jpg",
214216
binary_data=b"Encoded image bytes"
215217
)
216218
```

0 commit comments

Comments
 (0)