17
devTea
5y

Anyone know a good js library for file explorer on html? Can’t find a good one on google

Comments
  • 3
    ...a what??

    You want to build what... An electron file explorer? A server file browser?
  • 3
    @AlgoRythm a file explorer shown on web as component, I figured ways to make it myself, but too tired to reinventing the wheel
  • 2
    @devTea I don't really understand and am therefore of no help
  • 4
    @AlgoRythm seems like the correct term is server explorer
  • 2
    @devTea OHHHH okay. What's your stack? Node? PHP? You mentioned JS so I'm assuming Node

    If it's node I'm sure there are a hundred million fucking packages on npm. If not I'll write you one
  • 4
    @AlgoRythm nah I decided to make on myself, the backend just generate the dirs/files and send the path to the front end to generate the icons and such thing
  • 3
    @devTea that's what I would do. Really a simple task, just make sure not to expose any sensitive paths.
  • 1
    Would it be something similar to what we see in a Jupyter notebook which contains folders and files like how we would see them irl? I think i know what you want, some time ago I saw a library that does this. It is pretty hardcore stuff. Once I get close to my computer I'll check for you :D
  • 5
    @AlgoRythm yes I’m replacing the base dir and only show file extension specified on backend. Thanks for the concern
  • 3
    @AleCx04 yeah, but it won’t edit the content, it just shows folder and allow to download the files
  • 5
    @devTea Something I found is that browsers will correct for path transversals. You need to use cURL to truly test it.

    curl --path-as-is localhost:8080/../sensitive_file.dat

    Don't mean to tell you how to do your job, just offering some hopefully welcome experience.
  • 4
    @AlgoRythm oh that’s a good tips, thanks for mentioning it
  • 2
    Of you are using laravel, I would recommend laravel filemanager.
  • 1
    Internet explorer 6 😂
  • 2
    @err-occured I don't think he asked for a torturing tool, he just wanted a simple file explorer lol
  • 2
    @gitpush it does have a simple file explorer as it uses windows default file explorer layout. Granted it’s over 10 years old, but I’m sure you could make it work somehow 😂
  • 3
    @gitpush fuck sake 😂

    @err-occured well this is going access shared folder so browser built-in mostly doesn’t allow a redirect to there
  • 2
    @Wombat I’m on .net
  • 1
    For a similar task I had, I used ag-grid, they have good documentation for all front end frameworks and even a nice example on their website.

    https://ag-grid.com/example-file-br...
  • 1
    @rabbi already ended up building one, but I will check on it later, thanks for mentioning it
  • 1
    @hash-table thanks for the code, will look into it
  • 1
    Notify me when u found a good solution, please:) Will need it sooner or later
  • 2
    @neoliun I made one by myself, it’s not hard I’m just lazy so I asked first
  • 2
    @devTea h5ai ? It's quite nice if that's the kind of thing you're looking for.
  • 1
    @-red will look into it, thanks
  • 1
    You mean library like file-manager ?

    Example https://syncfusion.com/javascript-u...
Add Comment