nextcloud / previewgenerator

Nextcloud app to do preview generation in the background.
https://apps.nextcloud.com/apps/previewgenerator
GNU Affero General Public License v3.0
455 stars 57 forks source link

Deleting Previews #268

Closed Andrei1744 closed 2 years ago

Andrei1744 commented 2 years ago

Hi. How can I delete the previews from this app? I'm using Truenas. Any help is appreciated!

st3iny commented 2 years ago

Please use the search feature next time. Questions like this have been asked multiple times already.

WARNING: Proceed at your own risk. There is no official way to accomplish this. Always create backups before issuing such disruptive commands.

You could try following https://github.com/nextcloud/previewgenerator/issues/217#issuecomment-970223826.

Andrei1744 commented 2 years ago

Please use the search feature next time. Questions like this have been asked multiple times already.

WARNING: Proceed at your own risk. There is no official way to accomplish this. Always create backups before issuing such disruptive commands.

You could try following #217 (comment).

Problem is that I don't have that folder structure. I only have /usr/local/var and in var I have just to folders, db and lib

st3iny commented 2 years ago

This bug tracker is meant only for bugs but let me try to help.

First of all, which OS and web server are you running? Some operating systems have their apache data in /srv/http/. So your nextcloud previews could also be in /srv/http/data/appdata_XXX/preview.

Do you have a custom data path? Search your config.php for 'datadirectory' => '...'.

msberends commented 2 years ago

Please use the search feature next time. Questions like this have been asked multiple times already.

Then put it in README if so many people are looking for an answer. The issue tracker of GitHub isn't really suitable for searching answers to questions.

I've been looking across multiple forums now for this issue.

Edit: solution for now (also to cure a huge preview folder)

  1. Remove the folder your-nextcloud-data-directory/appdata_*/preview
  2. Optional: change parameters preview_max_x and preview_max_y in config.php (e.g., to 512), and change the previewgenerator app parameters heightSizes, squareSizes and widthSizes as per the README (or better yet, to a low value each, e.g. 512, 256 and 512 respectively)
  3. Run occ files:scan-app-data (this will reset the preview generation logs)
  4. Run occ preview:generate-all [user-id] (this will run very fast if you did step 2 🙂)
st3iny commented 2 years ago

Then put it in README if so many people are looking for an answer. The issue tracker of GitHub isn't really suitable for searching answers to questions.

I agree but I'm hesitant to add the deletion of previews to the FAQ because it's not supported. However, If so many of you report that it works just fine I might reconsider adding it to the FAQ.

st3iny commented 2 years ago

I added a section to the FAQ.