Automattic / Automattic/workspace

Clean up temporary pasted image files

Open
#21 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
5
Forks
2
PR merge metrics
No merged PRs in 30d

Description

## Summary
Temporary files created from pasted clipboard images should be cleaned up after they are no longer needed.

## Follow-ups
- Track which pending attachment URLs were created by clipboard paste.
- Delete pasted temp files when the user removes the pending attachment.
- Delete pasted temp files after a successful send/upload.
- Consider cleaning stale `WPWorkspacePastedImages` files on app launch or composer teardown.
- Do not delete user-selected files from the manual image picker.

## Context
Raw clipboard images are written under the system temp directory so they can reuse the existing file-based upload path. Those files currently have no explicit lifecycle cleanup.

Contributor guide

No contributing guide indexed for this repository

Research direction

No files or tests are named. Start by locating where clipboard images are written to the system temp directory and where pending attachment URLs are tracked, then trace removal and successful upload paths. Done means pasted temp files are cleaned up in those paths without deleting manually selected files; stale-file cleanup on launch or composer teardown remains a follow-up decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.