📂 Web File Browser
Go to file
Henrique Dias 885f11d324 Remove unused function and update docs
Former-commit-id: d7647f50647ee98107067ed6a17efc5e5ddd491a [formerly 0743e585ce077ea04dad4a21a2c6988fd2c0c2be] [formerly 3a7305c7a9c7d3e61895e49a0fb9db54a83ac9f5 [formerly 58ae0e7f31]]
Former-commit-id: e3ca983a2e072a4c9c1b93d5b087b4e9636fd7cf [formerly 83ff193587ab7ae0381c1d27fa5939fe118dc1a6]
Former-commit-id: 4f59b1c555df293ddd3bed3dee5b4c4aab7e532f
2017-07-20 09:44:27 +01:00
.github add caddy plugin 2017-06-26 15:39:35 +01:00
assets Fix typo Costum:Custom 2017-07-19 14:34:52 -05:00
caddy Build assets 2017-07-20 09:04:23 +01:00
cmd/filemanager Standalone 2017-07-20 09:03:14 +01:00
variables gofmt 2017-06-25 10:02:16 +01:00
.babelrc update 2017-07-06 08:12:19 +01:00
.editorconfig Move fonts and add go to editorconfig 2017-06-30 15:09:00 +01:00
.eslintignore update 2017-07-06 08:12:19 +01:00
.eslintrc.js update 2017-07-06 08:12:19 +01:00
.gitignore Standalone 2017-07-20 09:03:14 +01:00
.travis.yml Update .travis.yml 2017-07-20 09:13:36 +01:00
auth.go Trying to fix 403 on many requests #143 2017-07-19 08:28:01 +01:00
build.sh Fix bugs and such 2017-07-18 09:06:19 +01:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2017-06-25 21:01:54 +01:00
command.go Start integrating Hugo in the new plugin 2017-07-11 16:58:18 +01:00
doc.go Remove unused function and update docs 2017-07-20 09:44:27 +01:00
download.go Start integrating Hugo in the new plugin 2017-07-11 16:58:18 +01:00
file.go Start integrating Hugo in the new plugin 2017-07-11 16:58:18 +01:00
filemanager.go Remove unused function and update docs 2017-07-20 09:44:27 +01:00
http.go simplify 2017-07-19 07:43:04 +01:00
LICENSE.md License 2017-06-24 12:13:07 +01:00
package.json Fix some stuff 2017-07-06 08:52:39 +01:00
README.md update docs [ci skip] 2017-07-20 09:23:18 +01:00
resource.go Add User Permission check 2017-07-14 07:51:32 +01:00
rice-box.go.REMOVED.git-id Build assets 2017-07-20 09:04:23 +01:00
search.go Start integrating Hugo in the new plugin 2017-07-11 16:58:18 +01:00
settings.go Plugins settings working 2017-07-18 14:43:16 +01:00
users.go Fix for #142 2017-07-19 07:55:58 +01:00

filemanager

Build Go Report Card Documentation

filemanager provides a file managing interface within a specified directory and it can be used to upload, delete, preview, rename and edit your files. It allows the creation of multiple users and each user can have its own directory. It can be used as a standalone app or as a middleware.

Table of contents

Getting started

This is a library that can be used on your own applications as a middleware (see the documentation), as a plugin to Caddy web server or as a standalone app.

Once you have everything deployed, the default credentials to login to the filemanager are:

Username: admin Password: admin

Caddy

The easiest way to get started is using this with Caddy web server. You just need to download Caddy from its official website with http.filemanager plugin enabled. For more information about the plugin itself, please refer to its documentation.

Standalone

You can use filemanager as a standalone executable. You just need to download it from the releases page, where you can find multiple releases. The 'latest' always corresponds to the latest commit made to the master branch so it might not be stable.

You can either use flags or a JSON configuration file, which should have the following appearance:

{
  "port": 80,
  "database": "/path/to/database.db",
  "scope": "/path/to/my/files",
  "allowCommands": true,
  "allowEdit": true,
  "allowNew": true,
  "commands": [
    "git",
    "svn"
  ]
}

The scope, allowCommands, allowEdit, allowNew and commands options are the defaults for new users. To set a configuration file, you will need to pass the path with a flag, like this: filemanager --config=/path/to/config.json.

Otherwise, you may not want to use a configuration file, which can be done using the following flags:

-allow-commands
      Default allow commands option (default true)
-allow-edit
      Default allow edit option (default true)
-allow-new
      Default allow new option (default true)
-commands string
      Space separated commands available for new users (default "git svn hg")
-database string
      Database path (default "./filemanager.db")
-port string
      HTTP Port (default "80")
-scope string
      Defualt scope for new users (default ".")

Features

Easy login system.

Login Page

Listings of your files, available in two styles: mosaic and list. You can delete, move, rename, upload and create new files, as well as directories. Single files can be downloaded directly, and multiple files as .zip, .tar, .tar.gz, .tar.bz2 or .tar.xz.

Mosaic Listing

File Manager editor is powered by Codemirror and if you're working with markdown files with metadata, both parts will be separated from each other so you can focus on the content.

Markdown Editor

On the settings page, a regular user can set its own custom CSS to personalize the experience and change its password. For admins, they can manage the permissions of each user, set commands which can be executed when certain events are triggered (such as before saving and after saving) and change plugin's settings.

Settings

We also allow the users to search in the directories and execute commands if allowed.

Users

We support multiple users and each user can have its own scope and custom stylesheet. The administrator is able to choose which permissions should be given to the users, as well as the commands they can execute. Each user also have a set of rules, in which he can be prevented or allowed to access some directories (regular expressions included!).

Users

FileManager allows you to search through your files and it has some options. By default, your search will be something like this:

this are keywords

If you search for that it will look at every file that contains "this", "are" or "keywords" on their name. If you want to search for an exact term, you should surround your search by double quotes:

"this is the name"

That will search for any file that contains "this is the name" on its name. It won't search for each separated term this time.

By default, every search will be case sensitive. Although, you can make a case insensitive search by adding case:insensitive to the search terms, like this:

this are keywords case:insensitive

Contributing

If you want to contribute or want to build the code from source, you will need to have NodeJS and Go installed on your computer. You should start by doing the following:

go get github.com/hacdias/filemanager

Then, you should navigate to $GOPATH/src/github.com/hacdias/filemanager and execute npm install. You can start the live build of static assets with the command npm start dev.

If you are using this as a Caddy plugin, you should use its official instructions for plugins and import github.com/hacdias/filemanager/caddy/filemanager.

Before pulling, and if you made any change on assets folder, you must run the build.sh script on the root of this repository.