Skip to content

Allow MIME detection for crashpad attachments in the backend #955

@Kobby-Bawuah

Description

@Kobby-Bawuah

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

Attach a JSON file and try to view it within the issue page. The preview option is greyed out with the text: Attachment cannot be previewed

A user got around this by adding contentType.
It's a property on the attachment object
const filename = 'XXX.json';
const contentType = 'application/json'; // helps show Preview in Sentry
hint.attachments = hint.attachments || [];
hint.attachments.push({ filename, data, contentType });

We should try to derive the content type from the file name.

Expected Result

Can view the payload in the issue.

Actual Result

Screenshot 2023-10-11 at 4 30 07 PM

Product Area

Issues

Link

No response

DSN

No response

Version

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions