Regenerate thumbnail and preview for upload duplicate file

nc13

#1

I am using flowupload for uploading file, if i upload any file which already exist in directory file uploaded successfully but thumb and preview are not regenerate for newly uploaded file always shows old file thumbnail and preview , only download file work correctly.

Is there any solution to regenerate thumbnail and preview …


#2

php occ preview:generate-all -vvv


#3

Thank you @Sanook
I think its generate preview for all so this takes always to much time ,
but why we do this if i have changes only few file so i need to generate preview for only those files.


#4

Add bellow code after file uploaded

OC_Hook::emit(
	\OC\Files\Filesystem::CLASSNAME,
	\OC\Files\Filesystem::signal_post_write,
	array( \OC\Files\Filesystem::signal_param_path => $result . $path)
);

its working fine


#5

You can add a PR: