Commit 2f72c13
Changed files (1)
src
src/database.py
@@ -235,7 +235,7 @@ async def set_cf_r2(
upload = json.dumps(data, ensure_ascii=False).encode("utf-8")
elif isinstance(data, str):
upload = data.encode("utf-8")
- payload["ContentType"] = "text/plain"
+ payload["ContentType"] = mime_type if mime_type.startswith("text") else "text/plain"
payload |= {"Body": upload}
if compress: