1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 07:55:36 +00:00

fix heic format rotate image (#7430)

This commit is contained in:
Michael An
2025-02-06 10:50:09 +08:00
committed by GitHub
parent fef0d63712
commit a96990ebbc
3 changed files with 66 additions and 2 deletions

View File

@@ -27,7 +27,8 @@ const ImageDialog = ({ enableRotate: oldEnableRotate, imageItems, imageIndex, cl
// The backend server does not support rotating HEIC images
let enableRotate = oldEnableRotate;
const suffix = mainImg.src.slice(mainImg.src.lastIndexOf('.') + 1, mainImg.src.lastIndexOf('?')).toLowerCase();
const urlParts = mainImg.src.split('?')[0].split('.');
const suffix = urlParts[urlParts.length - 1];
if (suffix === 'heic') {
enableRotate = false;
}