summaryrefslogtreecommitdiffstats
path: root/core/Controller/AvatarController.php
Commit message (Collapse)AuthorAgeFilesLines
* composer run cs:fixCôme Chilliet2023-01-201-8/+8
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Update avatars on updateCarl Schwan2022-09-091-1/+1
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Avatar new styleCarl Schwan2022-09-091-1/+39
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Remake profile picture saving with VueChristopher Ng2022-09-021-0/+13
| | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* Use Image class from public APIChristopher Ng2022-06-021-3/+3
| | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* Update core to PHP 7.4 standardCarl Schwan2022-05-201-49/+21
| | | | | | | - Typed properties - Port to LoggerInterface Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix caching of the user avatarCarl Schwan2022-02-251-1/+1
| | | | | | | | | | Now on firefox/safari it is only refetched once a day. On Chrom{e,ium} we keep the previous behavior of maybe refetching it more often. This also notify the user about this behavior when they upload an avatar picture. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Only allow avatars in 64 and 512 pixel sizeJoas Schilling2022-02-071-4/+9
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix errors in AvatarController when data() returns nullCôme Chilliet2021-11-231-2/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-2/+2
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* show informative errors in log and UI on avatar upload error in user settingsJulien Veyssier2021-04-011-1/+13
| | | | Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove unused members and importsJoas Schilling2020-09-081-6/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* The privacy setting is only about syncing to other serversJoas Schilling2020-09-031-15/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Cache the avatar for a dayRoeland Jago Douma2020-05-121-2/+2
| | | | | | | | I noticed that on larger systems esp when using talk the avatars get revalidated like crazy. Because people keep the tab open etc. You can do with a slightly outdated avatar! Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headers for 19Christoph Wurst2020-04-291-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix (array) indent style to always use one tabChristoph Wurst2020-04-091-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix multiline commentsChristoph Wurst2020-04-081-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #19723 from nextcloud/bug/18603/avatar-responseRoeland Jago Douma2020-03-031-2/+2
|\ | | | | Always use status 200 for avatar response
| * Always use status 200 for avatar responseDaniel Kesselberg2020-03-011-2/+2
| | | | | | | | | | | | As discussed in #18603 caching a 201 response is hard. It's now possible to distinguish between generated and uploaded avatars by reading the X-NC-IsCustomAvatar (0 = generated, 1 = uploaded) header. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* | Also cache avatars when it's not allowedJoas Schilling2020-02-281-4/+6
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update license headersChristoph Wurst2019-12-051-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #17715 from nextcloud/fix/5456/respect_avatar_privacyJoas Schilling2019-12-041-16/+20
|\ | | | | Honor avatar visibility settings
| * Update testsRoeland Jago Douma2019-11-131-21/+3
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
| * Honor avatar visibility settingsRoeland Jago Douma2019-10-281-4/+26
| | | | | | | | | | | | | | | | | | Fixes #5456 Only when an avatar is set to public should we show it to the public. For now this has an open question as to how to solve federated avatars. But I assume a dedicated paramter or endpooint would make sense there. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Some php-cs fixesRoeland Jago Douma2019-11-221-1/+2
|/ | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Implement guest avatar endpointMichael Weimann2019-02-071-1/+0
| | | | Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
* Make the info available if the avatar was uploaded or generatedJoas Schilling2018-08-011-5/+6
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Removed debug stackJohn Molakvoæ (skjnldsv)2018-06-151-1/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Avatar imagick bumpJohn Molakvoæ (skjnldsv)2018-06-131-48/+14
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Controller tests fixesJohn Molakvoæ (skjnldsv)2018-06-131-6/+16
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Return Svg avatarsJohn Molakvoæ (skjnldsv)2018-06-131-9/+37
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix usageRoeland Jago Douma2018-06-041-8/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove unused import statementsMorris Jobke2018-02-141-1/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Improve OC_Image code to not guess the type of input, but actually request ↵Morris Jobke2018-01-181-2/+4
| | | | | | | | the specific methods to be called Followup to #7836 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Move avatar code to Avatar ClassRoeland Jago Douma2017-11-291-159/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Always generate avatarRoeland Jago Douma2017-11-291-5/+155
| | | | | | | | Even if no avatar is set we should just generate the image. This to not duplicate the code on all the clients. And only server images from the avtar endpoint. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headersMorris Jobke2017-11-061-1/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Exclude avatar from Same-Site Cookie requirementLukas Reschke2017-10-111-0/+1
| | | | | | Required to work with the upcoming Collabora avatar integration. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Return the user id in case of an errorJoas Schilling2017-08-291-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix AvatarControllerRoeland Jago Douma2017-08-011-2/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Cache all avatar responsesRoeland Jago Douma2016-11-301-16/+10
| | | | | | | * Cache for 30 minutes * Also cache when avatar can't be found Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix avatar on exif rotated imagesRoeland Jago Douma2016-10-261-0/+1
| | | | | | Fixes #1928 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Check the mimetype before reading the content and catch exceptionJoas Schilling2016-10-181-1/+16
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Move AvatarController over to FileDisplayResponseRoeland Jago Douma2016-09-051-8/+3
|
* Cache avatars properlyRoeland Jago Douma2016-08-301-5/+29
| | | | | * Set proper caching headers for avatars (15 minutes) * For our own avatar use some extra logic to invalidate when we update
* AvatarController use proper JSONResponseRoeland Jago Douma2016-08-291-42/+33
| | | | | * Do not rely on DataResponse magic. We want JSON so use JSON * Fix tests
* AvatarController cleanupRoeland Jago Douma2016-08-251-21/+23
| | | | | | | * Use all DI components * Let the AppFramework resolve the AvatarController * Update unit tests * Unit tests no longer require DB