Skip to content

Commit

Permalink
Issue 94 File thumbnails don't show up after upload of new files (#153)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
sunilnatraj and wetneb authored Dec 5, 2024
1 parent 7bb756b commit 378bf1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/scripts/project/thumbnail-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class ThumbnailReconRenderer extends ReconCellRenderer {
.attr("target", "_blank")
.appendTo(divContentRecon);

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

0 comments on commit 378bf1b

Please sign in to comment.