question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No way to remove attachments

See original GitHub issue

While attaching files to events I found out that there is no way to remove attached files. The only way is to completely clear the scope which is not feasible without losing a lot of information.

Would it be possible to add a clearAttachments() method in Scope analogously to the clearBreadcrumbs() method?

Currently I have to resort to reflection to manually clear the attachments CopyOnWriteArrayList…

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
philipphofmanncommented, Jun 25, 2021

I’m going to open up a PR to update the docs. @marandaneto we should also update them for Java after releasing this PR. PR for Apple docs.

1reaction
xmanucommented, Jun 8, 2021

That would also be a valid solution, but it seems weird to me design wise… Attaching for a single event is already possible using withScope instead of configureScope… This would result in having this functionality twice (even though your proposed solution is more powerful and would cover my use-case whereas withScope does not).

I would greatly prefer a way to manipulate the global scope as it is already possible with other scope based values like breadcrumbs, tags, contexts or extras. All of those have different means of also removing not only adding. Having a clearAttachments (or alternatively getAttachments being public and a removeAttachment method) would IMHO be a solution more in line with the rest of the API… (it almost looks like an oversight that this is not possible for attachments right now)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove an attachment - Microsoft Support
Open the email that contains the attachment you want to delete. In the Attached box, right-click the attachment, and click Remove or select...
Read more >
Best Ways to Remove Email Attachments from Outlook 2019
Click on the drop-down arrow appearing on the side of your attachments. Click on the drop-down arrow; Now, tap on the option “Remove...
Read more >
How to Remove Outlook Attachments from Multiple Emails?
Step 1: Launch the Outlook and open the targeted email. ; Step 2: In the attachment box, click right on the attachment, select...
Read more >
Remove Attachments | Outlook Freeware
Deletes attachments from messages, contacts, appointments, meetings, tasks, notes, journal entries and other Outlook items by file mask.
Read more >
How to remove all attachments from email in Outlook?
1. Select one or multiple email messages with the attachments you want to remove, then click Kutools > Attachment Tools > Detach All....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found