From 24df2167b294973ce230199370b7b061e6ae4498 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 27 Dec 2019 16:21:43 -0800 Subject: set mimetype when PUT to minio --- python/sandcrawler/minio.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/sandcrawler/minio.py b/python/sandcrawler/minio.py index 25518f4..41dd29a 100644 --- a/python/sandcrawler/minio.py +++ b/python/sandcrawler/minio.py @@ -63,11 +63,15 @@ class SandcrawlerMinioClient(object): if not bucket: bucket = self.default_bucket assert bucket + content_type = "application/octet-stream" + if extension.endswith('.xml'): + content_type = "application/xml" self.mc.put_object( bucket, obj_path, io.BytesIO(blob), len(blob), + content_type=content_type, ) return (bucket, obj_path) -- cgit v1.2.3