8000 Archive: Physically Delete Files After Confirmation · Issue #167 · photoprism/photoprism · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Archive: Physically Delete Files After Confirmation #167

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

Closed
4 of 5 tasks
kelvinhammond opened this issue Dec 21, 2019 · 40 comments
Closed
4 of 5 tasks

Archive: Physically Delete Files After Confirmation #167

kelvinhammond opened this issue Dec 21, 2019 · 40 comments
Assignees
Labels
idea Feedback wanted / feature request released Available in the stable release

Comments

@kelvinhammond
Copy link
Contributor
kelvinhammond commented Dec 21, 2019

Acceptance Criteria:

  • User MUST be able to select photos/videos within the archive and permanently/physically delete them using the context menu
  • User MUST be able to delete all photos/videos from the archive at once
  • Write unit tests
  • Write acceptance test
  • Update documentation

There should be an option to move a photo to the trash can on deletion.

Use case

  • Deleting photos that you no longer want but may want to go back to.
  • Preventing accidental deletion.

Functionality

  • Trash can album or place in sidebar
  • When photo is delete its move to the trash
  • Content in trash older than configured time is automatically deleted, if unlimited time then content in trash is not automatically emptied
  • Trash can album has "Empty trashcan" option to delete all items in trash
  • Items in trash can be deleted again but this time the message warns of permanent deletion and items are permanently deleted
  • Items in trash do not appear in main photos or albums
@lastzero lastzero added the idea Feedback wanted / feature request label Dec 21, 2019
@lastzero
Copy link
Member

Thank you for your feedback! We'll keep this suggestion for later... Need to provide a location service and implement editing metadata first. Deleting photos permanently certainly makes sense to free up storage space. Right now, we do a soft delete in the database - so the actual files are not deleted.

Please consider a donation if you 8000 like PhotoPrism. We're working on this full-time at the moment.

lastzero added a commit that referenced this issue Jan 6, 2020
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
@lastzero
Copy link
Member
lastzero commented Jan 6, 2020

@kelvinhammond I've just renamed "delete" to "hide" and added a page where you can see and restore hidden photos. Does this work for you? Thank you for supporting our project. Demo will be updated as soon as possible.

Screenshot 2020-01-06 at 05 39 34

@lastzero lastzero added the waiting Impediment / blocked / waiting label Jan 6, 2020
@lastzero lastzero self-assigned this Jan 6, 2020
@casidiablo
Copy link

I'm running the latest image from docker and I don't see this option. I would like to be able to just delete a photo altogether (i.e. remove the record from the DB and the files from my disk). Is that possible right now?

@lastzero
Copy link
Member

@lastzero
Copy link
Member
lastzero commented Jan 15, 2020

We don't delete physical files at the moment as many users are afraid... might add that option later or do it automatically after 3 months.

Would be good to gather some opinions, ideas and expectations before we implement something!

@lastzero lastzero removed the waiting Impediment / blocked / waiting label Jan 15, 2020
@casidiablo
Copy link

I guess one thing that would be great is to set some expectations as to what this project offers (or will offer). Here's what I'm planning to use it for, which I'm still not sure will work:

I want to basically replace Google Photos (the reason being that I want to host my own photos instead of giving that data to Google). I'm not sure if Photoprism will, eventually, have the most important features that Google Photos has, or if you and the contributors are planning to do such a thing.

Here's my wish list if this project tilts towards being a Google Photos replacement:

  • Allow hosting videos and not just photos
  • Include a way to automatically upload camera pictures from my phone to the Photoprism server (as in, backing up photos to my server)
  • Full control over the files (as in, rename them, move them around and delete them)
  • Make everything private by default (and behind a login) and allow me to share albums or pictures by generating. Right now I'm hiding Photoprism behind a basic HTTP auth mechanism on top of the Kubernetes ingress.

That said, I'm super glad I found this project and so far I'm enjoying using it. I'm about to move all my library to it just to see how well it scales (around 100GB worth of images).

@lastzero
Copy link
Member

Obviously this should also replace Google Photos (or Flickr in my case) for us.

Regarding the features:

  1. I don't have videos and I don't have time watching them, but I know how to do it and I've done similar things before. So either somebody else codes the video support (I can provide advice) or we find a way to compensate me or another commercial developer to implement this for those who need it. Don't like to talk about money anymore (thank you by the way!) as it's clear our community doesn't engage with this topic: https://github.com/photoprism/photoprism/wiki/Open-Source#lessons-learned
  2. Should be part of our mobile app: https://github.com/photoprism/photoprism-mobile
  3. No problem, although naming / copying them in the originals path is a bit tricky if you want the software to prevent duplicates and save storage at the same time. I personally don't care about the name in the file system as long I can easily download them as zip for sharing (they have helpful names in the archive).
  4. Authentication / authorization is not difficult and has low risk. That's why we do it last. Not sure how far this needs to go for a first release. Going to the Black Forest now, just finished the maps and need a break. Probably done in one or two days once this has priority.
  5. I think sharing and facial recognition would also be very important, might add that after a release though.

Let us know about your experience with many files. I'm using it with ~12.000 photos right now and like the performance. Maps might work with up to one million photos if you use it locally, although I would recommend to delete some as many of them are probably not very good!

@casidiablo
Copy link

No problem, although naming / copying them in the originals path is a bit tricky if you want the software to prevent duplicates and save storage at the same time. I personally don't care about the name in the file system as long I can easily download them as zip for sharing (they have helpful names in the archive).

I mean more naming the photo, not renaming the file itself.

Let us know about your experience with many files

My library has around 30k photos. So we will see 🤞 I'm sure it's going to take a few days importing/indexing because I'm running this on a very small server with only 2 cores and 2gb of ram.

@lastzero
Copy link
Member

Add some swap ;)

@lastzero
Copy link
Member

Make sure to at least pre-render small thumbs as your CPU will die otherwise when the browser requests 100 thumbs at once.

We'll add an edit dialog for image metadata, that's for sure! Not complicated, so also low priority.

@casidiablo
Copy link

Running import from the web works for a few seconds and then crashes. If I go into the container and manually run photoprism import it works for a while and then:

...
INFO[2020-01-16T17:28:01Z] exif: taken at 2014-10-20 10:09:16 +0000 UTC 
INFO[2020-01-16T17:28:01Z] import: moving main jpg file "google-takeout/Google Photos/2014-10-20/IMG_20141020_100916895.jpg" to "/assets/photos/originals/2014/10/20141020_100916_34CD65076EBE.jpg" 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x1d577e6]

goroutine 16 [running]:
github.com/photoprism/photoprism/internal/photoprism.(*MediaFile).Filename(...)
	/go/src/github.com/photoprism/photoprism/internal/photoprism/mediafile.go:307
github.com/photoprism/photoprism/internal/photoprism.(*MediaFile).Basename(0x0, 0xc000130280, 0x40687c0)
	/go/src/github.com/photoprism/photoprism/internal/photoprism/mediafile.go:367 +0x26
github.com/photoprism/photoprism/internal/photoprism.(*Index).MediaFile(0xc004cf29a0, 0x0, 0x101010101010101, 0x101, 0x0, 0x0)
	/go/src/github.com/photoprism/photoprism/internal/photoprism/index_mediafile.go:37 +0x117
github.com/photoprism/photoprism/internal/photoprism.importWorker(0xc00009e960)
	/go/src/github.com/photoprism/photoprism/internal/photoprism/import_worker.go:91 +0xffc
github.com/photoprism/photoprism/internal/photoprism.(*Import).Start.func1(0xc00009e960, 0xc0063fe870)
	/go/src/github.com/photoprism/photoprism/internal/photoprism/import.go:73 +0x2b
created by github.com/photoprism/photoprism/internal/photoprism.(*Import).Start
	/go/src/github.com/photoprism/photoprism/internal/photoprism/import.go:72 +0x209

@lastzero
Copy link
Member
lastzero commented Jan 16, 2020

@casidiablo Can you open a separate issue for this please? :)

I know there are specific issues with photoprism import if it needs to run darktable-cli for RAW to JPEG conversion. Is it possible you import RAWs? Darktable doesn't like to be executed from goroutines and I didn't find a way to fix this yet... will take a deeper look next week, off now.

@lastzero
Copy link
Member

Too late ;) Created this issue for the bug: #202

@lzap
Copy link
lzap commented Jan 16, 2020

I very much appreciate the Archive feature, is it possible to implement a command that would give me list of all archived photos (full path name)? I'd review the list and then perform manual deletion. It looks like PhotoPrism could be my tool of choice for finding out trash photos and generating a list for physical deletion (move). I would like to list both JPEG and RAW/HEIC files if possible to be able to completely cleanup those.

@lastzero
Copy link
Member

@lzap Of course that would be possible... Only thing we need to be careful with is not to make our UI too complex with too many buttons and options.

lastzero added a commit that referenced this issue Jan 22, 2020
See #167 (comment)

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
@lastzero lastzero changed the title Implement trashcan Use trashcan to physically delete files after confirmation Jun 27, 2020
lastzero added a commit that referenced this issue Oct 4, 2020
This is a fix for unstacking issues in certain situations. More general
photo delete functionality will be added later, see #167.

Signed-off-by: Michael Mayer <michael@lastzero.net>
@swingstate
Copy link

Wanted to give this a shot and move 10yrs of iCloud / Google Photos into a self hosted space. Performance as a Docker container so far seems to be very good - however, I still seem to not be able to delete pictures?

Not sure what the intend behind this is, but that's a gap. If you want to provide a simple modern UX/UI for photo management - great, you're on track. However part of that UX is or should be, that I am able to delete photos, especially after or during an initial import which I am doing atm.

Please reconsider and add a simple delete button in the Archive.

Thanks

@lastzero
Copy link
Member

Will do. Focus right now is sustainable funding and stability. Worked two years for free. Short break before adding new features.

@graciousgrey graciousgrey self-assigned this Jan 26, 2021
@graciousgrey graciousgrey added the member-feature Available to members and contributors label Jan 26, 2021
@david1155
Copy link

Thank you! Feature is working now!

@graciousgrey graciousgrey added released Available in the stable release and removed please-test Ready for acceptance test labels Feb 8, 2021
@david1155
Copy link

@lastzero Thank you very much for implementing this feature!
I found bug: when I physically delete video file via interface, transcoded *.avc is not removed from .sidecar folder.

@lastzero
Copy link
Member

Possible, since we don't index it in the first place... maybe better put in the cache folder.

@lastzero
Copy link
Member

Amazing how the "simple video support" we agreed to implement now becomes a "Mission to Mars" 🚀

@david1155
Copy link

Just to clarify, thumbs .jpg are deleted, but .avc is not.

@lastzero
Copy link
Member

I know, give us a second to fix it 👍

@lastzero
Copy link
Member
lastzero commented Feb 15, 2021

Let us know if this works for you! New preview build has been started: https://docs.photoprism.app/getting-started/updates/#development-preview

@krisnova
Copy link

Following along closely - let me know if I can offer any support/help here :) thanks for this! can't wait to use this feature!

@lastzero
Copy link
Member

Already implemented 👍 Let me know if you need help activating it!

@gipadm
Copy link
gipadm commented Feb 20, 2021

I am struggling with the delete feature. After moving a photo to the archive, the only option is to restore the image. How can I delete a photo and why is it so difficult?
If users are that scared of accidentally deleting photos, why not add a basic "are you sure?" prompt, and even "enable delete" item in the settings menu.

@graciousgrey
Copy link
Member

This feature is an early access feature for our sponsors. If you become a sponsor we let you know how to enable it. Otherwise you need to wait until it will become available for everyone :)

@photoprism photoprism deleted a comment from gipadm Feb 22, 2021
@ITCMD
Copy link
ITCMD commented Nov 1, 2021

Any updates on when this crucial and basic feature will no longer be in "early access" (if that's what you want to call it)?

@lastzero
Copy link
Member
lastzero commented Nov 1, 2021

Any updates on when we reach our funding goal or when you notice this is generally available now?

@ITCMD
Copy link
ITCMD commented Nov 1, 2021

Any updates on when we reach our funding goal or when you notice this is generally available now?

Not sure what "generally available" means. Do you mean publicly available? Latest version still does not allow me to enable the "delete" feature in settings without becoming a sponsor.

@lastzero
Copy link
Member
lastzero commented Nov 1, 2021

Which version specifically? Did you update properly or do you need support? Which GitHub page still says you need to be a sponsor? Generally available means it's not an early-access feature anymore.

@lastzero lastzero removed the member-feature Available to members and contributors label Nov 1, 2021
@lastzero
Copy link
Member
lastzero commented Nov 1, 2021

Label has been removed, hope this helps you to calm down a bit.

@lastzero
Copy link
Member
lastzero commented Nov 1, 2021

Let us tell you this once again as you don't seem to understand:

Your feeling of entitlement is completely misguided.

You can and could always simply delete directly in the filesystem using ANY tool or a terminal and then index. You can also delete via WebDAV. Only the delete button in the UI has been implemented earlier than planned originally to do our sponsors a favor.

Building this software has been almost 4 years of work for 2 people full-time. Check how much we get in donations. Stop complaining if you wouldn't do the same thing for us.

@ITCMD
Copy link
ITCMD commented Nov 1, 2021

As far as the version, our automatic update was not working due to a known Docker bug with DNS servers. Apologies for the confusion on that part.

I also understand the hard work you have put into this software, and I am not trying to belittle that. Once I'm at a point where I can comfortably support this software I will gladly do so.

This particular issue was one of consistent frustration with other users as seen on Reddit and this issue. I fully support locking features behind subscriber access, in fact I would not be upset if map plotting was also locked. However, as stated by other users, deleting files was a crucial feature that appeared to be ignored.

Again, I do apologize for the confusion with the latest edition, I understand how a user complaining about a missing feature that has already been added is frustrating.

@lastzero
Copy link
Member
lastzero commented Nov 1, 2021

You know my email if you need free support.

@shouldsee
Copy link
shouldsee commented Oct 7, 2022

Thanks for sharing this great software! Very easy to setup and use!

in case anyone hits this issue, I found this doc page helpful https://docs.photoprism.app/user-guide/organize/delete/

@lastzero lastzero moved this to Released 🌈 in Roadmap 🚀✨ Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea Feedback wanted / feature request released Available in the stable release
Projects
Status: Release 🌈
Development

No branches or pull requests

0