Nextcloud重建Preview

date
May 7, 2022
slug
tip-nextcloud-regenerate-preview-smallersize
status
Published
summary
小技巧 nextcloud
tags
tip
type
Post
URL

Problem & Summary

Solution


# install app "Preview Generator"
# https://apps.nextcloud.com/apps/previewgenerator

sudo -u www php  /www/wwwroot/nc.ck.mk/occ config:system:set preview_max_x --value 1024
sudo -u www php  /www/wwwroot/nc.ck.mk/occ config:system:set preview_max_y --value 1024
sudo -u www php  /www/wwwroot/nc.ck.mk/occ config:app:set previewgenerator squareSizes --value="32 256"
sudo -u www php  /www/wwwroot/nc.ck.mk/occ config:app:set previewgenerator widthSizes  --value="256 384"
sudo -u www php  /www/wwwroot/nc.ck.mk/occ config:app:set previewgenerator heightSizes --value="256"
sudo -u www php  /www/wwwroot/nc.ck.mk/occ config:system:set jpeg_quality --value 60
sudo -u www php  /www/wwwroot/nc.ck.mk/occ config:app:set preview jpeg_quality --value="60"


cd /www/wwwroot/nc.ck.mk/data/
rm -rf appdata_*/preview

sudo -u www php  /www/wwwroot/nc.ck.mk/occ files:scan-app-data
# first time
sudo -u www php  /www/wwwroot/nc.ck.mk/occ preview:generate-all -vvv
# add to cron
sudo -u www php  /www/wwwroot/nc.ck.mk/occ preview:pre-generate -v
notion image
notion image
notion image
 
 

© Ying Bun 2021 - 2022