Skip to content

Commit 378bf1b

Browse files
sunilnatrajwetneb
andauthored
Issue 94 File thumbnails don't show up after upload of new files (#153)
* Issue 94 File thumbnails don't show up after upload of new files Projects uploading new media do not contain the File prefix in the file name. Added check to get proper filename when the prefix File: is missing. * Update module/scripts/project/thumbnail-renderer.js Co-authored-by: Antonin Delpeuch <[email protected]> --------- Co-authored-by: Antonin Delpeuch <[email protected]>
1 parent 7bb756b commit 378bf1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

module/scripts/project/thumbnail-renderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class ThumbnailReconRenderer extends ReconCellRenderer {
6161
.attr("target", "_blank")
6262
.appendTo(divContentRecon);
6363

64-
var bareFileName = match.name.substr('File:'.length).replaceAll(' ', '_');
64+
var bareFileName = (match.name.startsWith('File:') ? match.name.substr('File:'.length) : match.name).replaceAll(' ', '_');
6565
var fileNameParts = bareFileName.split('.');
6666
var extension = fileNameParts[fileNameParts.length - 1].toLowerCase();
6767
if (!self.supportedExtensions.includes(extension)) {

0 commit comments

Comments
 (0)