$smallest = self::storeWithPreview($image, $user['uid'], $resource_id, $filename, $filesize, $album, $desc, $allow_cid, $allow_gid, $deny_cid, $deny_gid);
if ($smallest < 0) {
- Logger::notice('Photo not stored', ['resource-id' => $resource_id]);
+ Logger::warning('Photo could not be stored', ['uid' => $user['uid'], 'resource_id' => $resource_id, 'filename' => $filename, 'album' => $album]); Logger::notice('Photo not stored', ['resource-id' => $resource_id]);
return [];
}
$smallest = Photo::storeWithPreview($image, $owner['uid'], $resource_id, $filename, $filesize, $album, '', $allow_cid, '', '', '');
if ($smallest < 0) {
- $this->return(401, $this->t('Image could not be uploaded'));
- @unlink($src);
+ $this->logger->warning('Photo::store() failed');
+ $this->return(401, $this->t('Image upload failed.'));
}
$this->logger->info('upload done');