Is it possible to autoupdate thumbnails after files are modified?

Hi!

Is it possible to make OC auto-update thumbnails as needed? For example, if I manually add or delete files from data directory then it still shows me thumbnails of deleted files, and I only get errors after I try to open this file. And also added files doesnt show up.

Is is possible to configure OC so that it would show actual directory listing instead of cached listing so that when data directory is updated by something else that OC itself, it would still show?

From this link https://bartsimons.me/manually-add-files-to-owncloud/ I found the command that fixed the problem for me:
occ files:scan --all
But the problem with it is that in that case I need to run it everytime directory contents are changed by 3rd party program. It can probably optimized a little bit but still I need to run it alot.

Is it possible configure/modify it to list directory everytime, and then if something does not have thumbnail, generate it and if it does then use existing?

I would also like to know where is the actual code located that gets run when I user occ files:scan username? Just curious to know if its good or bad idea to run it everytime some directory is opened from web interface. Like if I would make my own copy of that tool that also allows to specify directory which to scan would I reduce the useless running of it? Or what are your ideas?

It seems you’re doing things wrong. The ownCloud’s data directory must be treated as a blackbox: nobody touch it outside of ownCloud and nobody cares about its structure. Modifying files there is NOT supported.
External storages are the ones that allow this behaviour. You can change files inside external storages as it is planned.

The occ files:scan command is there mainly to fix stuff. If you need to run it on regular basis, you’re doing it wrong.

I’d recommend you to go back to square one and re-think what you want to acomplish. Trying to fix something that you’re breaking on purpose (maybe because you didn’t know, ok) isn’t the way to go.

1 Like