Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When items that contains attachments are deleted, the attachments are just abandoned inside documents folder #416

Closed
6 tasks done
EdWorth120 opened this issue Dec 29, 2024 · 1 comment
Labels
🕷️ bug Something isn't working

Comments

@EdWorth120
Copy link
Contributor

EdWorth120 commented Dec 29, 2024

First Check

  • This is not a feature request
  • I added a very descriptive title to this issue.
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the documentation, with the integrated search.
  • I already read the docs and didn't find an answer.
  • I can replicate the issue inside the Demo install.

Homebox Version

0.16.0

What is the issue you are experiencing?

When I create an Item and add a photo or any other attachment, and later delete it, the attachments are not deleted, it is just abandoned inside .data/group-id-code-here/documents. Unless I edit the item and delete the attachments one by one, then it deleted correctly from storage. There should be a lot of attachments that are no longer used lying around in my storage.

I was wondering too why the system maintains a record inside the documents table inside the database with information about the storaged file even when the attachment is deleted before the item and the item nor the file exist anymore.

How can the maintainer reproduce the issue?

Create an item and add a photo.
Look at the last file created in data/group-id-code-here/documents, it will be there.
Delete the item, the photo will still be in the storage path pointed above.

Create another item and add a photo.
Look at the last file created in data/group-id-code-here/documents, it will be there.
Access this last created item, edit it, and delete the photo.
The photo should be deleted from the storage path pointed above.
Now delete the item.

Deployment

Other

OS Architechture

x86_64 (AMD, Intel)

Deployment Details

I'm using the latest binary release to Linux 64 bits, homebox_Linux_x86_64.tar.gz in a Debian 12 system.

@EdWorth120 EdWorth120 added the 🕷️ bug Something isn't working label Dec 29, 2024
@tankerkiller125
Copy link
Contributor

Will include this as part of #265, will implement an automated task that runs every so often to clean up orphaned attachments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕷️ bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants