Preview files on a web server?

I am currently browsing files (mostly images) on our server using HTTP in the most primitive way (very inefficient way).

enter image description here

To take a quick look at the file, I need to click it and open it. Then exit to the next file. Very inefficient.

Is there a way that I can view these files without opening them, just like what we do on our Mac / Windows system.

enter image description here

+4
source share
1 answer

Fancybox, , , . Apache DOM.

. , , , . , :

  • Fancybox

  • fancybox Fancybox.

  • fancybox.html fancybox Fancybox . . .

  • ( ) fancybox.html, Apache. , 26 :

        $(this).html("<img src='"+ $(this).attr('href') +"' width='200'>" + title);
    
  • .htaccess ( , .htaccess Apache)

  • .htaccess:

    Options +Indexes
    ReadmeName /fancybox/fancybox.html
    

Apache, , . . . , , , , , ReadmeName javascript css, DOM.

+2

Source: https://habr.com/ru/post/1675189/


All Articles