Skip to content
Commit 6869d2e8 authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Throw error in showPreview instead the constructor

This function is also used in a way such as:

```
	$preview = new \OC\Preview(\OC_User::getUser(), 'files');
	$info = \OC\Files\Filesystem::getFileInfo($file);
	if (!$always and !$preview->isAvailable($info)) {
		\OC_Response::setStatus(404);
	} else {
		$preview->setFile($file);
		$preview->setMaxX($maxX);
		$preview->setMaxY($maxY);
		$preview->setScalingUp($scalingUp);
		$preview->setKeepAspect($keepAspect);
	}
```

Which won't work anymore since `setFile` is used instead of passing the file in the constructor. Fixes a regression in master.
parent 079ad18b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment