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

Merge branch '11.0'

This commit is contained in:
lian
2024-11-01 16:32:20 +08:00
13 changed files with 55 additions and 19 deletions

View File

@@ -587,15 +587,23 @@ class DirentGridView extends React.Component {
const path = Utils.encodePath(Utils.joinPath(this.props.path, name));
const cacheBuster = new Date().getTime();
const fileExt = name.substr(name.lastIndexOf('.') + 1).toLowerCase();
const isGIF = fileExt === 'gif';
const src = `${siteRoot}repo/${repoID}/raw${path}?t=${cacheBuster}`;
let thumbnail = '';
const isGIF = fileExt === 'gif';
if (repoEncrypted || isGIF) {
thumbnail = src;
thumbnail = `${siteRoot}repo/${repoID}/raw${path}?t=${cacheBuster}`;
} else {
thumbnail = `${siteRoot}thumbnail/${repoID}/${thumbnailSizeForOriginal}${path}`;
}
let src = '';
const isTIFF = fileExt == 'tiff';
if (isTIFF) {
src = `${siteRoot}thumbnail/${repoID}/${thumbnailSizeForOriginal}${path}`;
} else {
src = `${siteRoot}repo/${repoID}/raw${path}`;
}
return {
name,
thumbnail,