Open FractalizeR opened 2 years ago
Hi. When this option is enabled mime type is guessed by extension using /etc/mime.types, so it shouldn't differ for different files. Does it reproduce for you every time with the "bad" file? I tried to upload it into my bucket and it got the correct mime type: https://storage.yandexcloud.net/vitalifpublictest/6113f3893b8cc_RNKB.svg
Looks random currently. I will try to inspect object meta a little later and see if it helps. Will report here. From about 100 files, i have around 10 good ones, others are "bad". But their names doesn't look different. Extension is .svg everywhere
Something looks to be wrong with the sync. I checked metadata of the files and some of them are ok:
but most are not:
They all were uploaded in a single go from GeeseFS using fsync. How can I help dig this down further? I tried to delete and recreate bucket - no success.
PNG files have the same problem. Some have png content type, but most are left with octet-stream
No idea... I tried to upload ~6500 gif/png/jpg files and all of them got correct MIME types. Also I don't see how https://pkg.go.dev/mime#TypeByExtension may give random results. By the way, what happens if you just remove --use-content-type? AFAIK in this case MIME type is guessed by the server.
Enabled --use-set-content-type when mounting bucket (Bucket is from Yandex Cloud). Bucket versioning enabled. Static website hosting enabled. GeeseFS version geesefs version 0.30.5. Then uploaded files into it using
rsync -r --rsync-path="sudo rsync" ~/Downloads/cc-images/ <host>:/mnt/ccimages
This file is served with "application/octet-stream" and browsers can't display it correctly. But this one has mime type set correctly to image/svg+xml.
FSTab is like this: