JPG on R2 served with wrong content type

Hi,

I recently migrated a lot of images from AWS to R2 and then connected a custom domain. However for some reason, all JPG images show Content-Type: application/octet-stream instead of Content-Type: image/jpeg like before.

This is causing a lot of cache misses with Cloudflare. How can I fix this issue and have the correct content type?

This is the response:

HTTP/1.1 200 OK
Content-Type: application/octet-stream
Last-Modified: Wed, 01 Mar 2023 11:07:15 GMT
Report-To: {“endpoints”:[{“url”:“https://a.nel.Cloudflare.com/report/v3?s=qM93IgR58tl2AiZ7DhBRW3KsBbjBZq86uj%2Fh%2BRon5pUOG6kLI%2FIuaTuM%2FLgII2FizCRZfWGFKiyyTKSs09ElDJiCm2m0zzaj9z7%2FSWc%2F%2FGRDHqOuFpxp80s2ZYdw%2BU4Ag%2BwCME8%3D”}],“group”:“cf-nel”,“max_age”:604800}
Cache-Control: max-age=31536000
Date: Wed, 15 Mar 2023 20:56:49 GMT
Content-Length: 14424
Connection: keep-alive
ETag: “908dbbdab1794abb4c3f60c5cdae9ccc”
Accept-Ranges: bytes
Vary: Accept-Encoding
NEL: {“success_fraction”:0,“report_to”:“cf-nel”,“max_age”:604800}
Server: Cloudflare
CF-Cache-Status: MISS
CF-RAY: 7a87aa49f9703752-MXP