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

ObjectStoreDatasetManager.create does not add content_type to metadata file #320

Open
aaraney opened this issue Apr 17, 2023 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@aaraney
Copy link
Member

aaraney commented Apr 17, 2023

The ObjectStoreDatasetManager's create method does not add the "application/json" content-type to a serialized Dataset during upload. Consequently, you cannot preview a serialized Dataset in the minio UI.

result = self._client.put_object(bucket_name=name, object_name=self._gen_dataset_serial_obj_name(name),

This is a super easy fix, the content_type should be added as shown:

        result = self._client.put_object(
            bucket_name=name,
            object_name=self._gen_dataset_serial_obj_name(name),
            data=io.BytesIO(bin_json_str),
            length=len(bin_json_str),
            content_type="application/json"
        )
@viktoriussuwandi
Copy link
Contributor

Hi @aaraney ,
I have create PR try to solve this,
Is there anything else needed to fix this issue ?

Appreciate your response !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants