Skip to content

Commit

Permalink
fix(sample): Add contentType to attachments to enabled preview in Sen…
Browse files Browse the repository at this point in the history
…try (#3382)
  • Loading branch information
krystofwoldrich committed Nov 10, 2023
1 parent 4d4659f commit dfbbbb4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sample-new-architecture/src/Screens/HomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,14 @@ const HomeScreen = (props: Props) => {
scope.addAttachment({
data: 'Attachment content',
filename: 'attachment.txt',
contentType: 'text/plain',
});
if (data) {
scope.addAttachment({ data, filename: 'logo.png' });
scope.addAttachment({
data,
filename: 'logo.png',
contentType: 'image/png',
});
}
console.log('Sentry attachment added.');
});
Expand Down

0 comments on commit dfbbbb4

Please sign in to comment.