JSPM

  • Created
  • Published
  • Downloads 411
  • Score
    100M100P100Q81336F
  • License MIT

Simple share folder via http with upload

Package Exports

  • http-up
  • http-up/lib/http-up.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (http-up) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

http-up

Simple share folder via http with upload

Multiple files upload to current showed folder

In extended mode you can delete group of files

Mobile window

If you switch --extend-mode

App will change main list view to table.

Below you see display width more than 992 pix (1), less than (2) and mobile window (3):

Fast running without install

npx http-up .

or

npx http-up --port 3999 /path/to/fold

Basic auth

[!IMPORTANT]
It is recommend for work on public network interfaces

every time when you start, you get a list of random accounts

npx http-up --basic .

or only one basic auth specific user

npx http-up --user login1 --password EAJteG5 .

The safest run

npx http-up --tls --basic /path/to/you

read for TLS support below

Only share

npx http-up --upload-disable --folder-make-disable /tmp/fold

File encrypt

[!IMPORTANT]
Be careful. If you download .crypt file with WRONG password, it file will be contain MESS of bytes


Your server need package openssl. It will be use openssl aes-256-cbc

npx http-up --extend-mode --crypt /tmp

Then, set your passcode to the form. The passcode store on the form between requests and you not need input it every time (if you clear it server will not use openssl).

During the process of uploading, your files will be encrypt and their EXT change to .crypt

When files lying on your server, their data is crypted.

If you need decrypt any .crypt flles, set your passcode, and click on file. During download this file, it will be decrypt on the fly.

Server will be encrypt upload file:

npx http-up --extend-mode --crypt /tmp
  • if you set --crypt arg on cmd
  • if you set passcode (pass code set by form)

Server will be decrypt download file:

npx http-up --extend-mode --crypt /tmp
  • if you set --crypt arg on cmd
  • if filename contain .crypt extension
  • if you set right passcode (pass code set by form)

Server will be decrypt download file (case 2):

npx http-up /tmp
  • if filename contain .crypt extension
  • if you get file with code param: /fold3/file.jpg.crypt?code=YOUR_PASS_HERE

Automatic TLS keys generate

  • For start HTTPS server you need easyrsa linux package
  • When you start server with --tls option, all keys generate automatically
npx http-up . --tls
  • Server use self signed certs, generated at first time. Thus you need approve this connection on your clients.

Magic file index.html inside any folder

If you put inside folder index.html, it will be return as context

Linux packages needs for full functional

  • md5sum (coreutils package) - make md5 sum of file
  • convert (ImageMagick package) - for thumbnails
  • libreoffice (free office) - for thumbnails
  • easyrsa - package for certs build
  • openssl - encrypt support
  • zip - cmd util

Notes

[!CAUTION] Be careful, if you start this App on public network interface, anybody can work with it

[!CAUTION]
Always run this app only under unprivileged common user

  • If you run application under some User, this user should be have privileges to write target folder

History

backlog

    • add table of files with extended information and sort instead simple list?
    • need some aside panel with folders tree?
    • save whitespaces for filenames?
    • add arg --tee and --log to file
    • need tests and vulnerability tests too
    • what is the lib can resize images enough fast
    • and how store thumbs (home dot cache folder?)

1.6.1

  • API: remove target file or folder while COPY or MOVE

1.6.0

  • file encrypt

1.5.0

  • move group operation buttons to top panel
  • add sort operation
  • add move group API (with side panel folder)
  • add copy group API (with side panel folder)
  • add zip and download group API

1.4.0

  • make root config folder as /home/USERNAME/.httpup/
  • temp and easyrsa folder moved to root config folder
  • add /__thumb/ preview generator for img and documents

1.3.0

    • check file index.html inside folder and show it

1.2.7

    • success publish with right /view folder path

1.2.4

    • core: rewrite for template express-handlebars (big rewrite)
    • remove unused assets
    • change http_path_clear util function

1.2.2

    • change out and path.join everywhere
    • set sendfile

1.2.0

twin brother rewrite to v1.2.0

    • add --extend-mode (table view, thumbnails and delete)
    • decomposition of code

1.0.57

    • add folder tree

1.0.51

    • add two experimental view modes

1.0.48

    • show upload progress as simple as possible

1.0.47

    • decomposition
    • change default content type
    • set utf charset for js files

1.0.44

    • cors for api
    • cmd args configure
    • add folder with tests

1.0.43

    • 401 error page show
    • new util.http_path_clear function

1.0.42

    • show basic login in log

1.0.41

    • basic auth with --basic make list of credentials

1.0.37

    • add tls

1.0.35

    • security fix - double slashes

1.0.34

    • filename and foldername letters extended

1.0.32 and 1.0.33

    • security fix - double dot

1.0.31

    • catch read errors and new error page

1.0.30

    • grouping folders on top of list
    • change stdout log info

1.0.29

    • --upload-disable and --folder-make-disable keys

1.0.27

    • set right mime type

1.0.26

    • change stdout log info
    • change file listing view to full row
    • move uploader and folder create interfaces up
    • arg --log to file

1.0.25

    • show files_count_max warning

1.0.21

    • add basic auth

1.0.19

    • remove H1
    • autoclean temp folder
    • change breadcrumbs font
    • change list font

1.0.17

    • change temp folder to /tmp/httpup
    • change copy function to rename
    • fix multiple upload

1.0.16

    • add config file

1.0.15

    • make folder by enter

1.0.14

    • swap bg color between folder and file

1.0.13

    • decomposition for lib/http-up.js

1.0.12

    • make new folder via web interface

1.0.11

    • refresh npm modules with clear recreate lock file

1.0.10

    • refresh bootstrap
    • file size warning show
    • add prettier for code
    • refresh npm modules with clear recreate lock file
    • public folder automake (if not exist)
    • file size show in page

Join to dev

clone repo: https://github.com/western/http-up

download necessary packs: npm i

run instance: npm run start or ./bin/http-up