File tree Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ const ATTACHMENT_ENVELOPE = createEnvelope<EventEnvelope>(
23
23
length : 20 ,
24
24
filename : 'test-file.txt' ,
25
25
content_type : 'text/plain' ,
26
- attachment_type : 'text ' ,
26
+ attachment_type : 'event.attachment ' ,
27
27
} ,
28
28
'attachment content' ,
29
29
] as AttachmentItem ,
Original file line number Diff line number Diff line change
1
+ export type AttachmentType =
2
+ | 'event.attachment'
3
+ | 'event.minidump'
4
+ | 'event.applecrashreport'
5
+ | 'unreal.context'
6
+ | 'unreal.logs' ;
7
+
8
+ /**
9
+ * An attachment to an event. This is used to upload arbitrary data to Sentry.
10
+ *
11
+ * Please take care to not add sensitive information in attachments.
12
+ *
13
+ * https://develop.sentry.dev/sdk/envelopes/#attachment
14
+ */
1
15
export interface Attachment {
2
16
data : string | Uint8Array ;
3
17
filename : string ;
4
18
contentType ?: string ;
5
- attachmentType ?: string ;
19
+ /**
20
+ * The type of the attachment. Defaults to `event.attachment` if not specified.
21
+ */
22
+ attachmentType ?: AttachmentType ;
6
23
}
Original file line number Diff line number Diff line change
1
+ import type { AttachmentType } from './attachment' ;
1
2
import type { SerializedCheckIn } from './checkin' ;
2
3
import type { ClientReport } from './clientreport' ;
3
4
import type { DsnComponents } from './dsn' ;
@@ -72,7 +73,7 @@ type AttachmentItemHeaders = {
72
73
length : number ;
73
74
filename : string ;
74
75
content_type ?: string ;
75
- attachment_type ?: string ;
76
+ attachment_type ?: AttachmentType ;
76
77
} ;
77
78
type UserFeedbackItemHeaders = { type : 'user_report' } ;
78
79
type FeedbackItemHeaders = { type : 'feedback' } ;
You can’t perform that action at this time.
0 commit comments