moshaorui 5 dní pred
rodič
commit
7e13f92c97
1 zmenil súbory, kde vykonal 4 pridanie a 1 odobranie
  1. 4 1
      app/Libraries/CommonHelper.php

+ 4 - 1
app/Libraries/CommonHelper.php

@@ -494,7 +494,10 @@ Admin::script(
             if ($(this).hasClass('fullscreen-image') || $(this).hasClass('video-thumbnail')) {
                 return;
             }
-            const fileName = this.src.split('/').pop().split('?')[0];
+
+           // const fileName = this.src.split('/').pop().split('?')[0];
+            const getFileName = url => url.split('?')[0].split('/').pop();
+            const fileName = getFileName(this.src);
 
             $(this).wrap('<div class="download-wrapper"></div>')
                 .after(`<div class="download-hover">