Skip to content

Commit dfbbbb4

Browse files
fix(sample): Add contentType to attachments to enabled preview in Sentry (#3382)
1 parent 4d4659f commit dfbbbb4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sample-new-architecture/src/Screens/HomeScreen.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,14 @@ const HomeScreen = (props: Props) => {
147147
scope.addAttachment({
148148
data: 'Attachment content',
149149
filename: 'attachment.txt',
150+
contentType: 'text/plain',
150151
});
151152
if (data) {
152-
scope.addAttachment({ data, filename: 'logo.png' });
153+
scope.addAttachment({
154+
data,
155+
filename: 'logo.png',
156+
contentType: 'image/png',
157+
});
153158
}
154159
console.log('Sentry attachment added.');
155160
});

0 commit comments

Comments
 (0)