-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DATA-2034] Add file extensions to binary data capture upload #466
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this, the file extension will help us upload pcds, but does it also get translated to mime_type? The current issue we are facing is that the replay camera filters for objects with a mime_type of pcd
@@ -437,6 +437,7 @@ async def binary_data_capture_upload( | |||
method_parameters: Optional[Mapping[str, Any]] = None, | |||
tags: Optional[List[str]] = None, | |||
data_request_times: Optional[Tuple[datetime, datetime]] = None, | |||
file_extension: Optional[str] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can/does the file extension get translated to mime_type in the cloud?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the lightning fast fix and supporting if the user doesn't provide a prepended period!
@@ -437,6 +437,7 @@ async def binary_data_capture_upload( | |||
method_parameters: Optional[Mapping[str, Any]] = None, | |||
tags: Optional[List[str]] = None, | |||
data_request_times: Optional[Tuple[datetime, datetime]] = None, | |||
file_extension: Optional[str] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/viam/app/data_client.py
Outdated
@@ -453,6 +454,7 @@ async def binary_data_capture_upload( | |||
tags (Optional[List[str]]): Optional list of tags to allow for tag-based data filtering when retrieving data. | |||
data_request_times (Optional[Tuple[datetime.datetime, datetime.datetime]]): Optional tuple containing `datetime`s objects | |||
denoting the times this data was requested[0] by the robot and received[1] from the appropriate sensor. | |||
file_extension (str): The file extension of binary data including the period, e.g. .jpg, .png, .pcd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you include that this routes the file to its corresponding mime type in the backend?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agreenb how's this for text:
The backend will route the binary to its corresponding mime type based on this extension.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thanks!
Add ability to provide file_extension to binary data capture upload