Skip to content
Snippets Groups Projects
  • Morris Jobke's avatar
    f56ae37e
    Opening the trashbin causes errors in log for files without preview · f56ae37e
    Morris Jobke authored
    * put a file without a generated preview in the trashbin
      (e.g. a *.docx file)
    * open the trashbin
    * following errors will show up in the nextcloud.log:
    	- filesize(): stat failed for ...
    	- fopen(...): failed to open stream: No such file or directory at ...
    	- fread() expects parameter 1 to be resource, boolean given at ...
    	- fclose() expects parameter 1 to be resource, boolean given at ...
    	- imagecreatefromstring(): Empty string or invalid image at ...
    
    This is because the preview code tries to load an SVG image, which
    is obviously only text.
    
    The fix simply handles this before the loading happens and the web UI
    keeps showing the default mimetype icon.
    f56ae37e
    History
    Opening the trashbin causes errors in log for files without preview
    Morris Jobke authored
    * put a file without a generated preview in the trashbin
      (e.g. a *.docx file)
    * open the trashbin
    * following errors will show up in the nextcloud.log:
    	- filesize(): stat failed for ...
    	- fopen(...): failed to open stream: No such file or directory at ...
    	- fread() expects parameter 1 to be resource, boolean given at ...
    	- fclose() expects parameter 1 to be resource, boolean given at ...
    	- imagecreatefromstring(): Empty string or invalid image at ...
    
    This is because the preview code tries to load an SVG image, which
    is obviously only text.
    
    The fix simply handles this before the loading happens and the web UI
    keeps showing the default mimetype icon.
PreviewNotAvailableException.php 931 B