Skip to content

Delete uploaded files when answer is deleted #2676

@do-it4fun

Description

@do-it4fun

Please use the 👍 reaction to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!

Describe the bug
I have a form in which participants can attach files to their answers. If I delete an answer, the corresponding files are not deleted, which leads to unnecessary storage consumption.

To Reproduce
Steps to reproduce the behavior:

  1. Create a form with a question of the type file
  2. Answer the form and upload a file
  3. A new folder is created for the uploaded file:

Image

  1. In the Form go to Results > Answers and delete the answer using the 3-dot menu:

Image

  1. The answer is deleted from the overview.
  2. The previously created subfolder for the answer containing the uploaded file remains.
  3. Expected behavior: The subfolder of the corresponding answer and the containing files should be deleted when the answer is deleted.

Nextcloud (please complete the following information):

  • Nextcloud-Version: Nextcloud Hub 9 (30.0.6)
  • Forms-Version: 5.0.4

Additional context
The form is shared with other users who can also delete the answers, but it does not matter which user deletes the answer.

Metadata

Metadata

Assignees

Labels

1. to developAccepted and waiting to be taken care ofbugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions