Coder Social home page Coder Social logo

Comments (6)

aperezdc avatar aperezdc commented on August 21, 2024

The potential problem I see with this is that requesting a whole directory may end up in huge transfers being sent to the clients. Not to mention that it would add quite a bit of complexity to the module. I will think about it a bit more, but so far what would be best in my opinion is to put this fuctionality in a separate module.

from ngx-fancyindex.

lnicola avatar lnicola commented on August 21, 2024

I suppose that directory downloads could be disabled by configuration.

I agree about the complexity argument. On the other hand, I'm not familiar to the NGINX module API, but ngx-fancyindex seems already complex as-is. Perhaps some of this is inherent to the API? :)

A while ago I looked into implementing something like this for Lighttpd. It seemed to me that Lighttpd plugins output chains of chuks of a few types, which include strings, byte arrays and file fragments. The tar format is well-fit for this, since it can be built on-the fly: it's got file headers followed by data [1]. This even allows for sendfile to be used by the server.

The NGINX API seemed similar to this, but somewhat more involved.

[1] Things are a bit more fiddly than this because of the need to handle long file names and symlinks, but it's still streamable.

from ngx-fancyindex.

aperezdc avatar aperezdc commented on August 21, 2024

Yes, the Nginx API might be a bit more complex, but things are still manageable and streaming the created tarball to the client in chunks is certainly possible. My concern is about the complexity... anyhoo, I will revisit this idea after tagging the 0.4.0 release.

from ngx-fancyindex.

mapsic avatar mapsic commented on August 21, 2024

I can't find fancyindex.conf in my centos6.6

from ngx-fancyindex.

lnicola avatar lnicola commented on August 21, 2024

@mapsic ngx-fancyindex is an Nginx plugin. Until recently you had to build these plugins together with Nginx in order to use them, although it now supports shared linking. I don't know how it's done now.

from ngx-fancyindex.

aperezdc avatar aperezdc commented on August 21, 2024

@lnicola, @mapsic: Presently it's possible to build modules for Nginx and load them dynamically. This feature was introduced in Nginx 1.9.11, and is supported by ngx-fancyindex.

from ngx-fancyindex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.