-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(dav): fall back to generated avatar in image export plugin #45408
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
6f4841c
to
21a5dc8
Compare
))); | ||
$server->addPlugin(new \OCA\DAV\CardDAV\ImageExportPlugin( | ||
new \OCA\DAV\CardDAV\PhotoCache( | ||
\OC::$server->getAppDataDir('dav-photocache'), |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
$avatar = $this->avatarManager->getGuestAvatar($name); | ||
$image = $avatar->get($size); | ||
|
||
$response->setHeader('Content-Type', $image->mimeType()); |
Check notice
Code scanning / Psalm
PossiblyNullArgument Note
$avatar = $this->avatarManager->getGuestAvatar($name); | ||
$image = $avatar->get($size); | ||
|
||
$response->setHeader('Content-Type', $image->mimeType()); |
Check notice
Code scanning / Psalm
PossiblyFalseReference Note
$image = $avatar->get($size); | ||
|
||
$response->setHeader('Content-Type', $image->mimeType()); | ||
$fileName = $node->getName() . '.' . PhotoCache::ALLOWED_CONTENT_TYPES[$image->mimeType()]; |
Check notice
Code scanning / Psalm
PossiblyNullArrayOffset Note
$fileName = $node->getName() . '.' . PhotoCache::ALLOWED_CONTENT_TYPES[$image->mimeType()]; | ||
$response->setHeader('Content-Disposition', "attachment; filename=$fileName"); | ||
$response->setStatus(200); | ||
$response->setBody($image->data()); |
Check notice
Code scanning / Psalm
PossiblyNullArgument Note
$logger) | ||
$this->server->addPlugin( | ||
new ImageExportPlugin(new PhotoCache( | ||
\OC::$server->getAppDataDir('dav-photocache'), |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
Summary
TODO
Checklist