We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d9304c8 + e41a2e1 commit 7ffc168Copy full SHA for 7ffc168
src/components/ContactDetails/ContactDetailsAvatar.vue
@@ -309,12 +309,20 @@ export default {
309
*/
310
getMimetype(uint) {
311
const bytes = []
312
- uint.slice(0, 4).forEach((byte) => {
313
- bytes.push(byte.toString(16))
+ uint.slice(0, 12).forEach((byte) => {
+ bytes.push(byte.toString(16).padStart(2, '0'))
314
})
315
const hex = bytes.join('').toUpperCase()
316
317
- switch (hex) {
+ const nextcloudMajorVersion = parseInt(window.OC.config.version.split('.')[0])
318
+ if (nextcloudMajorVersion >= 31
319
+ && hex.slice(0, 8) === '52494646'
320
+ && hex.slice(16, 24) === '57454250'
321
+ ) {
322
+ return 'image/webp'
323
+ }
324
+
325
+ switch (hex.slice(0, 8)) {
326
case '89504E47':
327
return 'image/png'
328
case '47494638':
0 commit comments