Since I have updated Drupal to 9.4.7, media files are not rendering properly. This happens when we open a media for example https://example.com/media/node_id. Thanks!

Comments

hargurpreet created an issue. See original summary.

hargurpreet’s picture

Issue summary: View changes
hargurpreet’s picture

StatusFileSize
new597 bytes

Hi, I have fixed this issue by setting content type. I'm also attaching the patch to fix this issue. Thanks!

hargurpreet’s picture

Issue summary: View changes
hargurpreet’s picture

StatusFileSize
new457 bytes

Updated the patch file. Thanks!

clayfreeman’s picture

Version: 1.1.1 » 1.1.x-dev
Status: Active » Needs review
StatusFileSize
new619 bytes

I think I prefer adding this header to all responses if possible instead of just inline responses. Let me know if this patch resolves the issue for you.

  • clayfreeman committed b257ade on 1.1.x
    Issue #3313534 by hargurpreet, clayfreeman: Media files not rendering...

  • clayfreeman committed cf0d8d5 on 1.2.x
    Issue #3313534 by hargurpreet, clayfreeman: Media files not rendering...
clayfreeman’s picture

Assigned: hargurpreet » Unassigned
Status: Needs review » Fixed

I've added a default content type of application/octet-stream which will get overridden by the file's MIME type if one is available.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.