Coder Social home page Coder Social logo

serverwentdown / file-manager Goto Github PK

View Code? Open in Web Editor NEW
100.0 6.0 37.0 325 KB

A basic node.js file manager

Home Page: https://hub.docker.com/r/serverwentdown/file-manager

License: MIT License

JavaScript 58.89% CSS 2.52% Dockerfile 0.58% Handlebars 38.01%
nodejs file-manager totp express

file-manager's Introduction

file-manager

A basic node.js file manager.

Features

  • Simple authentication
  • Directory browsing
    • Filesize
    • Permissions
    • Owner
  • Folder creation
  • File uploads
    • Bulk file uploads
    • Large file uploads (sharded)
  • File/folder renaming
  • Previews for small image files
  • Bulk file/folder selection
    • Delete
      • Recursive directory delete
    • Move
    • Copy
    • Download archive
    • Change permissions
  • Remote commands

Usage

For users who prefer Docker:

docker run --rm -it -v $PWD:/data -p 8080:8080 serverwentdown/file-manager

Or if you have Node.js installed:

npm install -g https://github.com/serverwentdown/file-manager.git
file-manager

Screenshots

These screenshots are not up-to-date.

Options

The following environmental variables can be used to configure file-manager.

SESSION_KEY=

Express session key, generate something random.

SHELL=

Enable the shell feature, which allows users to start a login shell (when set to login) or the binary specified by this option (example: /bin/bash). Be careful when enabling this feature as anyone with access to this portal can execute any command on your machine.

CMD=

Set to something other than "false" to enable running single commands in the default shell, usually /bin/sh. Be careful when enabling this feature as anyone with access to this portal can execute any command on your machine.

PORT=

Listen on $PORT. Default: 8080

KEY=

Setting this variable enables authentication using TOTP (RFC6238). $KEY is a base32 encoded shared secret. This key is only a weak means of protection as it is succeptable to brute-force. You can generate one from here or manually.

file-manager's People

Contributors

ambrosechua avatar dependabot[bot] avatar iamaamir avatar serverwentdown avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

file-manager's Issues

Cleanup code

Currently, code is a monolithic blob of routes without abstractions.

Migrate everything to helper promises and map()s.

path to a other file

Describe the problem

Where can i change the path what is open now its ./ but when i wil a other file.
i know you say that i need to run de file manager in the folder but
i making a panel for a host and i wil add a file manager and i can not download de file manager in each file is there a other way?

Steps to reproduce

  1. checked the code

Screenshots or logs

No screens needed

What is my question?

is there a other way?

Auth code

How does one use the auth login code

invalid version 0.0.7a

% yarn global add https://github.com/serverwentdown/file-manager.git
yarn global v1.22.15
[1/4] ๐Ÿ”  Resolving packages...
error Can't add "file-manager": invalid package version "0.0.7a".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

Path of the files

Where can i change the path what is open now its ./ but when i wil a other file

"could not find a version of Visual Studio 2017 or newer to use" with VS2022

I installed VS 2022.

But I had an error while cloning:

npm ERR! code 1
npm ERR! path C:\Users\AnduinXue\AppData\Roaming\npm\node_modules\file-manager\node_modules\node-pty
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node scripts/install.js
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.2 found at "C:\Users\AnduinXue\AppData\Local\Programs\Python\Python310\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS checking VS2022 (17.1.32228.430) found at:
npm ERR! gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - missing any VC++ toolset
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack     at VisualStudioFinder.fail (C:\Users\AnduinXue\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack     at C:\Users\AnduinXue\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\AnduinXue\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
npm ERR! gyp ERR! stack     at C:\Users\AnduinXue\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack     at C:\Users\AnduinXue\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack     at C:\Users\AnduinXue\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack     at C:\Users\AnduinXue\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:406:5)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1090:16)
npm ERR! gyp ERR! System Windows_NT 10.0.22000
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\AnduinXue\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\AnduinXue\AppData\Roaming\npm\node_modules\file-manager\node_modules\node-pty
npm ERR! gyp ERR! node -v v17.7.2
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\AnduinXue\AppData\Local\npm-cache\_logs\2022-03-23T13_03_32_309Z-debug-0.log

Uncaught websocket error

Describe the problem

/usr/local/share/file-manager/node_modules/node-pty/lib/unixTerminal.js:236
            throw new Error('resizing must be done using positive cols and rows');
            ^

Error: resizing must be done using positive cols and rows
    at UnixTerminal.resize (/usr/local/share/file-manager/node_modules/node-pty/lib/unixTerminal.js:236:19)
    at WebSocket.<anonymous> (/usr/local/share/file-manager/index.js:459:11)
    at WebSocket.emit (node:events:365:28)
    at Receiver.receiverOnMessage (/usr/local/share/file-manager/node_modules/ws/lib/websocket.js:835:20)
    at Receiver.emit (node:events:365:28)
    at Receiver.dataMessage (/usr/local/share/file-manager/node_modules/ws/lib/receiver.js:428:14)
    at Receiver.getData (/usr/local/share/file-manager/node_modules/ws/lib/receiver.js:367:17)
    at Receiver.startLoop (/usr/local/share/file-manager/node_modules/ws/lib/receiver.js:143:22)
    at Receiver._write (/usr/local/share/file-manager/node_modules/ws/lib/receiver.js:78:10)
    at writeOrBuffer (node:internal/streams/writable:389:12)

Steps to reproduce

  1. Resize terminal with scrollwheel
  2. Server crashes

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.