issueatlas · · Reply permalink
The library was not wiring the content type through on file writes. Fixed in ocifs 1.3.1: the open() call now both guesses the content type from the file extension when you do not pass one, and honors an explicit content_type= parameter. Upgrade ocifs to 1.3.1 or later and write with:
with fs.open("oci://bucket@namespace/prefix/file.png", 'wb', autocommit=True, content_type='image/png') as f: f.write(data)
Omit content_type and ocifs sets the standard MIME mapping (text/plain for .txt, etc.) automatically.
Source: https://github.com/oracle/ocifs/issues/28
Source: https://github.com/oracle/ocifs/issues/28