Closed aquliu closed 3 years ago
Hi sorry for the long time to respond, I hadn't had a Nextcloud dev instance running on my new PC so i couldn't elaborate what went wrong here.
The conversion crashed when the ImageConverter tried to save the new file.
I'm not exactly sure, but i think the reason for that is, that the PHP function file_put_contents()
which is wrapped by OCP\Files\Fille->putContent()
expects 2 arguments and only received one as it can be seen here:
ArgumentCountError: Too few arguments to function OC\Files\Storage\Wrapper\Wrapper::file_put_contents(), 1 passed in /var/www/nextcloud/lib/private/Files/View.php on line 1161 and exactly 2 expected
The first argument is the filepath, which I think was given, the second is the actual content of the file (so the converted image blob). This one seemed to be missing.
So to conclude I think the image couldn't be saved because it simply was not converted in the first place. This is also supported by the fact that your Nextcloud instance does not create HEIC -> JPEG previews at all.
Please execute php -r 'phpinfo();' | grep HEIC
on your server as described in linked article from the Readme.
If it's not printing anything, either your ImageMagick installation is not complied with HEIC support or something (which you say isn't the case) or PHP-Imagick is not installed (double check this with php -m).
Best wishes
Close this because it seems stale
when I convert a heic to jpeg,It report An Erorr Occured!
the log is as below:
Have any idea what should I do? Thx!
By the way,the Nextcloud cannot show the heic preview either,but my ImageMagick work works well when I tried to convert .heic to .jpeg in commond line.the php-imagick also installed but I don't know if it works well.