aperezdc / ngx-fancyindex

Fancy indexes module for the Nginx web server
Other
849 stars 128 forks source link

Generated .txt files and opening this files in modal window, adding delete file button in viewinfo (copy url,close) #127

Open qben360 opened 3 years ago

qben360 commented 3 years ago

Hey someone can edit little bit a fancyindex? i got folder when api generating .txt files. I think its ok idea, when fancyindex listing generated files, when u click on file its href to http://ip/files/test.txt in new window, im trying to this to open files on click in modal window dialog, and on the right u can click more options to view info about file, there are 2 buttons copy url and close, someone can help me and add there third button named delete file?

ryandesign commented 2 years ago

This doesn't sound like anything that the developer of fancyindex needs to help you with. It sounds like a very specialized request and you already have all the tools to build this using your own html, css, and javascript.

Offering a way to delete a file would have to be implemented with a server side script, such as one written in php, lua, njs, etc. Be very careful how you implement this capability. You probably don't want random web visitors from the Internet (or even web crawling robots) to be able to delete any arbitrary file on your server, so you'll probably want to lock it down to only being able to delete files in a particular directory, or only matching a particular naming pattern, and you may want to restrict it only to certain logged in users.