I think putting them in the temporary file system until submitted is a good solution. The way it works (or doesn't) right now is a problem for me, because I have a view that shows files in a certain private files directory for submitted items, but it's also showing files for items that were not submitted, since they are put in the same directory even before/without submitting the form.
- π¨π¦Canada endless_wander
For what it's worth, my experience of this issue is via Webforms with "drafts" enabled and it can cause instances where if a user accidentally uploads the wrong file, that file stays on the website. Users could upload and have uploaded sensitive files by accident that website admins are not supposed to see -- financial records, for example. They click on "Remove" and would expect that the file would be deleted entirely from the system but it does not get removed. See https://www.drupal.org/project/webform/issues/3281450 π If drafts enabled, files uploaded to a submission are never deleted even if user explicitly "removes" them Closed: duplicate
I think it should also be noted that the filename "incrementing" isn't a bug or problem in itself. If you use revisions on nodes or other content, anytime a file is updated, the old file remains behind the scenes to preserve the prior revision, and the new filename will have a number added/incremented.
Does anyone else or a maintainer have any ideas on which direction a solution attempt should go? The issue summary suggests a few different methods.