Skip to content

Commit

Permalink
Add content_type to metadata file on python/lib/modeldata/dmod/modeld…
Browse files Browse the repository at this point in the history
…ata/data/object_store_manager.py (#387)
  • Loading branch information
viktoriussuwandi authored Jul 21, 2023
1 parent 266142c commit db4ca5e
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,13 @@ def persist_serialized(self, name: str):
The name of the dataset.
"""
bin_json_str = self.datasets[name].to_json().encode()
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))
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"
)

def reload(self, reload_from: str, serialized_item: Optional[str] = None) -> Dataset:
"""
Expand Down

0 comments on commit db4ca5e

Please sign in to comment.