File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515
1616#define SENTRY_LARGE_ATTACHMENT_SIZE (100 * 1024 * 1024) // 100 MB
1717
18+ static bool
19+ is_large_attachment (const sentry_path_t * path , size_t file_size )
20+ {
21+ // TODO: for temporarily testing with <1 MB minidumps
22+ // return file_size < 1024 * 1024 && sentry__path_ends_with(path, ".dmp");
23+
24+ (void )path ;
25+ return file_size >= SENTRY_LARGE_ATTACHMENT_SIZE ;
26+ }
27+
1828struct sentry_envelope_item_s {
1929 sentry_value_t headers ;
2030 sentry_value_t event ;
@@ -760,7 +770,7 @@ sentry__envelope_add_attachment(
760770 : sentry__path_get_size (attachment -> path );
761771
762772 sentry_envelope_item_t * item = NULL ;
763- if (file_size >= SENTRY_LARGE_ATTACHMENT_SIZE ) {
773+ if (is_large_attachment ( attachment -> path , file_size ) ) {
764774 if (attachment -> buf ) {
765775 item = envelope_add_item (envelope );
766776 if (item ) {
@@ -848,7 +858,7 @@ sentry__envelope_add_from_path(
848858 return NULL ;
849859 }
850860 size_t file_size = sentry__path_get_size (path );
851- if (file_size >= SENTRY_LARGE_ATTACHMENT_SIZE ) {
861+ if (is_large_attachment ( path , file_size ) ) {
852862 return envelope_add_attachment_ref (envelope , path , file_size , NULL );
853863 }
854864 size_t buf_len ;
You can’t perform that action at this time.
0 commit comments