Skip to content

preserve attachment metadata after validation errors - #229

Merged
flack merged 2 commits into
flack:masterfrom
duakayra:preserve-tempfile-attachment-metadata
Aug 14, 2026
Merged

preserve attachment metadata after validation errors#229
flack merged 2 commits into
flack:masterfrom
duakayra:preserve-tempfile-attachment-metadata

Conversation

@duakayra

Copy link
Copy Markdown
Contributor

No description provided.

return;
}

file_put_contents($attachment->location . '.metadata', json_encode([

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we're going to store this on the file system, there would need to be some cleanup at some point, otherwise these files will accumulate forever.

Another option might be to save this kind of stuff in midcom (or maybe system) temp dir, which get cleaned periodically

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking at the code some more, is att->location inside the tempdir at this point already? If so, maybe add a comment to that effect

@flack
flack merged commit e91a838 into flack:master Aug 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants