1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-20 10:58:33 +00:00

Merge branch '8.0'

This commit is contained in:
li an
2022-01-19 10:13:56 +08:00
3 changed files with 5 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ const { siteRoot, serviceUrl, seafileCollabServer } = window.app.config;
const userInfo = window.app.userInfo;
const userName = userInfo.username;
let dirPath = Utils.getDirName(filePath);
const IMAGE_SUFFIXES = ['png', 'PNG', 'jpg', 'JPG', 'gif', 'GIF'];
const IMAGE_SUFFIXES = ['png', 'PNG', 'jpg', 'JPG', 'jpeg', 'JPEG', 'gif', 'GIF'];
function getImageFileNameWithTimestamp() {
var d = Date.now();

View File

@@ -55,7 +55,8 @@ class FileContent extends React.Component {
let index2 = imagePath.indexOf('?');
imagePath = imagePath.substring(index + 5, index2);
// change image url
innerNode.data.src = serviceURL + '/view-image-via-share-link/?token=' + sharedToken + '&path=' + Utils.encodePath(imagePath);
// the image path has been encoded when inserting the image
innerNode.data.src = serviceURL + '/view-image-via-share-link/?token=' + sharedToken + '&path=' + imagePath;
}
return innerNode;
}