@@ -152,7 +152,7 @@ class DashboardController extends Controller { | |||
return new JSONResponse(['error' => $e->getMessage()], Http::STATUS_INTERNAL_SERVER_ERROR); | |||
} | |||
$currentVersion++; | |||
$this->config->setUserValue($this->userId, 'dashboard', 'backgroundVersion', $currentVersion); | |||
$this->config->setUserValue($this->userId, 'dashboard', 'backgroundVersion', (string)$currentVersion); | |||
return new JSONResponse([ | |||
'type' => $type, | |||
'value' => $value, |
@@ -141,6 +141,7 @@ class BackgroundService { | |||
*/ | |||
public function setFileBackground($path): void { | |||
$this->config->setUserValue($this->userId, 'dashboard', 'background', 'custom'); | |||
/** @var \OCP\Files\File $file */ | |||
$file = $this->userFolder->get($path); | |||
$this->dashboardUserFolder->newFile('background.jpg', $file->fopen('r')); | |||
} |