Git Product home page Git Product logo

file_server's Introduction

Portable filebrowser with html5 mobile ui.

TL;DR

Portable file server throught http. Uses:

  • Share videos/audios on your local network.
  • Expose docker volumes to http.
  • Share private server folders online

Run with docker:

docker run --rm -v /home/jordi:/tmp -p 8080:8080 jordic/file_server:1.0

without docker:

wget https://github.com/jordic/file_server/blob/master/builds/file_server_linux_amd64?raw=true
chmod +x file_server_linux_amd64
./file_server_linux_amd64 -dir $HOME  

The docker image, can receive env variables:

FILESERVER_AUTH = username:password for handling basic auth

FILESERVER_COMMAND = allow running shell commands from the UI

FILESERVER_DIR = dir to expose

FILESERVER_PORT = port for the service

Features

  • Mobile UI with almost all "usable displays", android and ios ( on ios, can't upload files)
  • Fast UI. Json + angular
  • Directory fuzzy search / Acces ( style textmate command+T)
  • Inline search ( current list )
  • Upload mutliple files.
  • Big uploads. Tested with 5G files. ( Uploads are streamed to disk )
  • File delete / remove / copy / compress
  • Dir creation
  • File editor with Codemirror ( javascript, html, css, php.. )
  • Filesystem json server
    • POST /dir action=createFolder source=name > Will create a folder in dir with name source
    • POST /dir action=delete source=name > will delete ... see commands.go
    • GET /dir &format=json
  • Download dirs as zip
  • File and video stream.
  • Basic http auth as param
  • Exec system commands ( enable with param )

screenshot

Install

Donwload a binary build: (Stable)

Or compile it:

go get github.com/jordic/file_server

go build or go install

Browser compatibility

  • Firefox, safari, Chrome.
  • Perpahs ie10 but not tested
@Todo
  • Add some type of flahs session, to notify user after an upload
  • Add the current path, and a direct acces to parent path
  • Add file operations, like delete, move or compress zip files..
  • Big code refactor to milestone 1.0.
  • Improbe filesystem json server.
  • Backend. Add system commands as plugin.. with System services or commands The commands must be, system commands, and should be configured, on json. App, only loads them, and handles execution of them
  • Create docs
  • UI. Add a Generic command with output ( Perhaps a modal )
  • UI. Improve javascript prompt, with some kind of widget

  • UI. Add a button on toolbar, with shortcuts to system commands

  • UI/Backend. Add a bookmark system. Perhaps a file .bookmark.js on root.

  • Back. Add param for CORS handling

  • Back. Add some kind of authentification
  • Back. Add some kind of permisions...
  • Back. Review log system.
Changelog
v1.0
  • Updated go-bindata
  • Added Dockerfile
  • Added env variables for handling docker config
  • Updated docs
v0.9
  • Big refactor using Angular for frontend and api calls for actions
v0.5
  • Added version number
  • File deleting operations

file_server's People

Contributors

dovahcrow avatar jordic avatar ninehills 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

file_server's Issues

can't build dockerfile

When I built the image through Dockerfile, why can't I build it successfully? I didn't install the go locale, i just cloned your code from github, and then built the image through Dockerfile.

Step 3 : ADD main /
Lstat main: no such file or directory

so I changed the main in Dockerfile to main.go

Sending build context to Docker daemon 83.54 MB
Step 1 : FROM scratch
 --->
Step 2 : MAINTAINER
 ---> Using cache
 ---> 205bcd0bc6a3
Step 3 : ADD main.go /
 ---> Using cache
 ---> 0bb996fe9c59
Step 4 : VOLUME "/tmp"
 ---> Using cache
 ---> 54550e394aae
Step 5 : EXPOSE 8080
 ---> Using cache
 ---> c53243f85fb7
Step 6 : CMD /main.go
 ---> Using cache
 ---> 879fbb6879df
Successfully built 879fbb6879df

After the construction is successful, but it can't be successful for run.
 Docker run -d -v /data/ftproot:/tmp -p 8300:8080 gsy36559067/fileserver:0.6

logs :
[root@master file_server]# docker logs -f 19f592f7f805
Panic: standard_init_linux.go:175: exec user process caused "exec format error" [recovered]
        Panic: standard_init_linux.go:175: exec user process caused "exec format error"
Goroutine 1 [running, locked to thread]:
Panic(0x7e9de0, 0xc8201205b0)
        /usr/local/go/src/runtime/panic.go:481 +0x3e6
Github.com/urfave/cli.HandleAction.func1(0xc8200ef2e8)
        /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:478 +0x38e
Panic(0x7e9de0, 0xc8201205b0)
        /usr/local/go/src/runtime/panic.go:443 +0x4e9
Github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization.func1(0xc8200eebf8, 0xc82001a0c8, 0xc8200eed08)
        /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:259 +0x136
Github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization(0xc820051630, 0x7f99ed60e728, 0xc8201205b0)
        /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:277 +0x5b1
Main.glob.func8(0xc82006ea00, 0x0, 0x0)
        /go/src/github.com/opencontainers/runc/main_unix.go:26 +0x68
reflect.Value.call(0x74e5e0, 0x8ffda0, 0x13, 0x846308, 0x4, 0xc8200ef268, 0x1, 0x1, 0x0, 0x0, ...)
        /usr/local/go/src/reflect/value.go:435 +0x120d
reflect.Value.Call(0x74e5e0, 0x8ffda0, 0x13, 0xc8200ef268, 0x1, 0x1, 0x0, 0x0, 0x0)
        /usr/local/go/src/reflect/value.go:303 +0xb1
Github.com/urfave/cli.HandleAction(0x74e5e0, 0x8ffda0, 0xc82006ea00, 0x0, 0x0)
        /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:487 +0x2ee
Github.com/urfave/cli.Command.Run(0x8491b8, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8df0e0, 0x51, 0x0, ...)
        /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/command.go:191 +0xfec
Github.com/urfave/cli.(*App).Run(0xc820001500, 0xc82000a100, 0x2, 0x2, 0x0, 0x0)
        /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:240 +0xaa4
Main.main()
        /go/src/github.com/opencontainers/runc/main.go:137 +0xe24

so i don't know what to do,Can you help me, thank you

Is this project dead?

No offence or anything, but I see that the last commit was 5 years ago and I wonder if I could make a similar project of my own...

issue with Nginx reverse proxy

links to style sheets, scripts and fonts are hard-coded as /-/xxx instead of -/xxx so that the service cannot run behind an Nginx proxy coexisting with other http services on the server with a same domain (actually intranet ip address).

My Nginx is configured to proxy "http://xxx/files/xxx" to "http://xxx:9002/xxx" since file server listens on port 9002.

It's not possible to use simple html rewrite because there can be arbitrary html files in the file system and they're not supposed to be rewritten.

authentication required

Anyone who visits the server can edit and remove files on it. So would it be more secure to add an authtication on the server? At least authentication for remove and edit.

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.