[iOS] Screenshot Attachments

Assuming images can be sent as an attachment in the upcoming release, would it be possible to display the image directly on Sentry without having to download it?

Also, we have Slack integration set up for incoming user feedback/crash reports, so it would be great to include the image with each post.

It’s currently not supported but sounds like a good next step for the attachments feature.
Thanks for raising this.

Do you set the file content-type when you add the attachment?

1 Like

I had no idea you could set a content-type according to the current docs (I understand they are still getting updated so no worries). In this case, would it be proper to pass in application/png? I’ve also appended the extension to the filename.

The docs are indeed missing to point content-type. For now here’s the header for iOS:

I’ve raised an issue for us to add it to the docs.

The issue is marked as up-for-grabs btw. If you’d like to contribute to Sentry, you could help us with that:

On the attachments page: https://docs.sentry.io/platforms/apple/guides/ios/enriching-events/attachments/

There’s an edit button on the bottom. Takes you to GitHub. If you’re interested in contributing you can just open a PR.

1 Like

Thanks, @borninla for reporting this. I just opened up a PR to improve the docs.

1 Like

Wow, you guys are fast… I planned on contributing today. :slight_smile: I’ll review the PR and see if there are any open questions left. Thanks!

1 Like

I’m sure you’ll find more that we can improve soon :slight_smile:

Thanks for trying things out and reporting it here. If you prefer you can also raise an issue on the repository on GitHub or if it’s a small change even just open Draft PR and we can discuss the change in there.