Skip to content
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

Nats object store image with header data #565

Open
paliriv opened this issue Jun 7, 2024 · 0 comments
Open

Nats object store image with header data #565

paliriv opened this issue Jun 7, 2024 · 0 comments
Labels
defect Suspected defect such as a bug or regression

Comments

@paliriv
Copy link

paliriv commented Jun 7, 2024

Observed behavior

When I put an image into the object store that has header data. CLI nats is unable to view or provide information on it. It either hangs or states that the image is corrupt.

Expected behavior

I would like to view Images that are in object store and their metadata through the cli.

Server and client version

nats-server: v2.10.12
nats CLI : 0.1.4

Host environment

OS Name Microsoft Windows 10 IoT Enterprise LTSC
python v3.11.1

Steps to reproduce

create a bucket
push image into bucket with headers.
in nats cli > nats object ls "streamName"

async def push_image_to_bucket(self, image: np.ndarray, result_data: dict, parameters: dict): self.logger.debug('pushing image') # convert bgr to rgb im_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) success, encoded_img = cv2.imencode('.jpg', im_rgb) data_bytes = encoded_img.tobytes() info = await self.object_store.put(name='test_image.jpg', data=data_bytes, meta=ObjectMeta( description='image for frontend display', headers={'type': "image/jpg", 'source': "vision", 'destination': "gui", 'parameters': parameters, 'result-data': result_data} )) print(f'Put entry {info.name} ({info.size} bytes) "{info.description}"') self.logger.debug(f'Put entry {info.name} ({info.size} bytes) "{info.description}"')

@paliriv paliriv added the defect Suspected defect such as a bug or regression label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Suspected defect such as a bug or regression
Projects
None yet
Development

No branches or pull requests

1 participant