jld3103
1be836273d
core: Add OpenAPI spec
...
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-07-13 07:24:15 +07:00
Faraz Samapoor
fc0e2a938f
Applies agreed-upon indentation convention to the changed controllers.
...
Based on https://github.com/nextcloud/server/pull/38636#discussion_r1218167753
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
2023-06-05 18:35:32 +07:00
Faraz Samapoor
450bf5c99e
Refactors controllers by using PHP8's constructor property promotion.
...
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
2023-06-04 23:20:35 +07:00
Côme Chilliet
f5c361cf44
composer run cs:fix
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +07:00
Carl Schwan
bc9a488046
Update avatars on update
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-09-09 14:23:41 +07:00
Carl Schwan
f98ae2b5b0
Avatar new style
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-09-09 13:37:51 +07:00
Christopher Ng
f44d2586b1
Remake profile picture saving with Vue
...
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-09-02 02:22:57 +07:00
Christopher Ng
57c66bf7cb
Use Image class from public API
...
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-06-02 00:37:36 +07:00
Carl Schwan
b70c6a128f
Update core to PHP 7.4 standard
...
- Typed properties
- Port to LoggerInterface
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-20 22:18:06 +07:00
Carl Schwan
36721a8d0d
Fix caching of the user avatar
...
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>
2022-02-25 14:24:07 +07:00
Joas Schilling
6dd60b6d30
Only allow avatars in 64 and 512 pixel size
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-07 16:47:51 +07:00
Côme Chilliet
5a20e20e9e
Fix errors in AvatarController when data() returns null
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:29:01 +07:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Julien Veyssier
7b69897474
show informative errors in log and UI on avatar upload error in user settings
...
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2021-04-01 11:55:13 +07:00
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +07:00
Christoph Wurst
d9015a8c94
Format code to a single space around binary operators
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +07:00
Joas Schilling
c2bef528ef
Remove unused members and imports
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-09-08 10:45:35 +07:00
Joas Schilling
a4b2403e29
The privacy setting is only about syncing to other servers
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-09-03 15:46:21 +07:00
Roeland Jago Douma
4a2a6b65f3
Cache the avatar for a day
...
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>
2020-05-12 19:37:25 +07:00
Christoph Wurst
cb057829f7
Update license headers for 19
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +07:00
Christoph Wurst
2fbad1ed72
Fix (array) indent style to always use one tab
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 10:16:08 +07:00
Christoph Wurst
85e369cddb
Fix multiline comments
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-08 22:24:54 +07:00
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +07:00
Roeland Jago Douma
6ea1aef031
Merge pull request #19723 from nextcloud/bug/18603/avatar-response
...
Always use status 200 for avatar response
2020-03-03 16:15:14 +07:00
Daniel Kesselberg
68148f4073
Always use status 200 for avatar response
...
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>
2020-03-01 00:42:24 +07:00
Joas Schilling
a92ab77747
Also cache avatars when it's not allowed
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-02-28 10:44:15 +07:00
Christoph Wurst
5bf3d1bb38
Update license headers
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +07:00
Joas Schilling
738e6bf079
Merge pull request #17715 from nextcloud/fix/5456/respect_avatar_privacy
...
Honor avatar visibility settings
2019-12-04 10:28:45 +07:00
Roeland Jago Douma
68748d4f85
Some php-cs fixes
...
* 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>
2019-11-22 20:52:10 +07:00
Roeland Jago Douma
54eb27dab2
Update tests
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-13 20:43:20 +07:00
Roeland Jago Douma
0bd1378f81
Honor avatar visibility settings
...
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>
2019-10-28 13:48:34 +07:00
Michael Weimann
bf1253cb49
Implement guest avatar endpoint
...
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2019-02-07 14:23:16 +07:00
Joas Schilling
decd196162
Make the info available if the avatar was uploaded or generated
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-08-01 10:56:22 +07:00
John Molakvoæ (skjnldsv)
543188d0cb
Removed debug stack
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-06-15 15:40:10 +07:00
John Molakvoæ (skjnldsv)
156da29cea
Avatar imagick bump
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-06-13 18:46:05 +07:00
John Molakvoæ (skjnldsv)
eea6f74ca4
Controller tests fixes
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-06-13 18:46:04 +07:00
John Molakvoæ (skjnldsv)
adf3856d35
Return Svg avatars
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-06-13 18:46:04 +07:00
Roeland Jago Douma
e5cc8be9d5
Fix usage
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-04 08:48:54 +07:00
Morris Jobke
d3d045dd5c
Remove unused import statements
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-02-14 16:55:43 +07:00
Morris Jobke
3d4c698f44
Improve OC_Image code to not guess the type of input, but actually request the specific methods to be called
...
Followup to #7836
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-18 13:40:55 +07:00
Roeland Jago Douma
ba648eecdf
Move avatar code to Avatar Class
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-11-29 14:23:15 +07:00
Roeland Jago Douma
604596ec16
Always generate avatar
...
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>
2017-11-29 14:23:15 +07:00
Morris Jobke
0eebff152a
Update license headers
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +07:00
Lukas Reschke
8ad17a66d6
Exclude avatar from Same-Site Cookie requirement
...
Required to work with the upcoming Collabora avatar integration.
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-10-11 14:41:34 +07:00
Joas Schilling
0aff1c9268
Return the user id in case of an error
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-29 11:10:30 +07:00
Roeland Jago Douma
aa6d8fcdbf
Fix AvatarController
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-08-01 08:20:15 +07:00
Roeland Jago Douma
5c602f3217
Cache all avatar responses
...
* Cache for 30 minutes
* Also cache when avatar can't be found
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-30 09:43:36 +07:00
Roeland Jago Douma
b05fe45d52
Fix avatar on exif rotated images
...
Fixes #1928
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-26 21:37:11 +07:00
Joas Schilling
656e3f7a24
Check the mimetype before reading the content and catch exception
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-18 16:22:20 +07:00
Roeland Jago Douma
6740c627b8
Move AvatarController over to FileDisplayResponse
2016-09-05 15:11:45 +07:00