mirror of
https://github.com/prasathmani/tinyfilemanager.git
synced 2026-01-08 16:32:06 +01:00
Compare commits
115 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd79258999 | ||
|
|
dd2e22781b | ||
|
|
cc3426aebe | ||
|
|
645d09a6ef | ||
|
|
c049ba96c8 | ||
|
|
7e7fb1f505 | ||
|
|
bf2c2a9a4d | ||
|
|
64f7b29c78 | ||
|
|
07ac97c20b | ||
|
|
8c78bc78f9 | ||
|
|
8a17a5b210 | ||
|
|
9792bd000f | ||
|
|
232fc78f2e | ||
|
|
c38dca17e4 | ||
|
|
ac3dd478f5 | ||
|
|
01cfb5d8ac | ||
|
|
94b62544bd | ||
|
|
1042994a60 | ||
|
|
3716af20a2 | ||
|
|
8d953bf0f9 | ||
|
|
d26c9e5cbf | ||
|
|
0f58c2ca65 | ||
|
|
b602dcd172 | ||
|
|
1bcc240119 | ||
|
|
8b330b75a4 | ||
|
|
f120daa607 | ||
|
|
e27e1abeb4 | ||
|
|
a4d96e0eaf | ||
|
|
843e240757 | ||
|
|
ecec756b71 | ||
|
|
8366e1bc29 | ||
|
|
d8fceac7dd | ||
|
|
a306f4f1f7 | ||
|
|
a1ae0fa729 | ||
|
|
ca4b1b1743 | ||
|
|
8e87afae5b | ||
|
|
43063e4746 | ||
|
|
47359d3f4e | ||
|
|
eb8f3d80bc | ||
|
|
f380478197 | ||
|
|
f7a2f77008 | ||
|
|
dabc4ea36e | ||
|
|
7ec19c1659 | ||
|
|
8486c7a240 | ||
|
|
8194249b66 | ||
|
|
da77df785a | ||
|
|
00541fc469 | ||
|
|
7ca87c9163 | ||
|
|
f6a93653be | ||
|
|
85f35bc28f | ||
|
|
3a90a5916a | ||
|
|
6a6eb8abec | ||
|
|
bf024c7c84 | ||
|
|
d705da604c | ||
|
|
94f1c92d80 | ||
|
|
bbb2114918 | ||
|
|
e071b2372c | ||
|
|
ba1b499d2b | ||
|
|
6775bcb176 | ||
|
|
4b2aef8737 | ||
|
|
1eed63cf1b | ||
|
|
200d9d6d49 | ||
|
|
cddd7eaab0 | ||
|
|
dd1ba6795c | ||
|
|
9c4d30d7b5 | ||
|
|
12baf03ef5 | ||
|
|
dc529dd590 | ||
|
|
69ccd952fc | ||
|
|
69495db9b4 | ||
|
|
313acf1b78 | ||
|
|
ac672b832c | ||
|
|
789b98f136 | ||
|
|
97fd394a0f | ||
|
|
8f2f65b9fc | ||
|
|
31b988db79 | ||
|
|
d09cc2f445 | ||
|
|
5a00707890 | ||
|
|
cfb9a57d5e | ||
|
|
652c05914f | ||
|
|
e30ec1dfd2 | ||
|
|
610cea8ecd | ||
|
|
d4019e6e10 | ||
|
|
f20d3e9e06 | ||
|
|
c4ab436f6d | ||
|
|
e5c78e8ab9 | ||
|
|
f8cedbcf59 | ||
|
|
df80b73436 | ||
|
|
8de16a4c8a | ||
|
|
4d8d4a3aba | ||
|
|
fce0f5bacb | ||
|
|
59c6b9b26a | ||
|
|
be49a13b8e | ||
|
|
2c0e6d216e | ||
|
|
805308a013 | ||
|
|
2a2d81ce78 | ||
|
|
2eb00ab3de | ||
|
|
74727fe48a | ||
|
|
6190ae69e9 | ||
|
|
3a3033bdce | ||
|
|
afe1227caa | ||
|
|
cda40e22f1 | ||
|
|
b24887d4fd | ||
|
|
17de8af81b | ||
|
|
50ccd29623 | ||
|
|
04c1d45b5f | ||
|
|
ca94f23c47 | ||
|
|
a65f8ff8b5 | ||
|
|
13b2bd0164 | ||
|
|
ccf18947c8 | ||
|
|
d4d620fe66 | ||
|
|
4d7078829d | ||
|
|
7bd9483728 | ||
|
|
179e13c4a6 | ||
|
|
4ff141bb15 | ||
|
|
9b2bb18acb |
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*.php text eol=lf
|
||||
*.json text eol=lf
|
||||
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@@ -1,5 +1,5 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: prasathmani
|
||||
patreon: ccpprogrammers
|
||||
open_collective: tinyfilemanager
|
||||
ko_fi: tinyfilemanager
|
||||
|
||||
7
.github/workflows/PublishDocker.yml
vendored
7
.github/workflows/PublishDocker.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
steps:
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v3
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: |
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/tinyfilemanager
|
||||
@@ -21,6 +21,8 @@ jobs:
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
@@ -35,4 +37,5 @@ jobs:
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
10
Dockerfile
10
Dockerfile
@@ -12,21 +12,15 @@ FROM php:7.4-cli-alpine
|
||||
# if run in China
|
||||
# RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
|
||||
RUN apk add \
|
||||
RUN apk add --no-cache \
|
||||
libzip-dev \
|
||||
oniguruma-dev
|
||||
|
||||
RUN docker-php-ext-install \
|
||||
zip \
|
||||
mbstring \
|
||||
iconv \
|
||||
fileinfo
|
||||
zip
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
COPY tinyfilemanager.php index.php
|
||||
COPY config-sample.php config.php
|
||||
RUN sed -i "s/\$root_path =.*;/\$root_path = \$_SERVER['DOCUMENT_ROOT'].'\/data';/g" config.php && \
|
||||
sed -i "s/\$root_url = '';/\$root_url = 'data\/';/g" config.php
|
||||
|
||||
CMD ["sh", "-c", "php -S 0.0.0.0:80"]
|
||||
|
||||
107
README.md
107
README.md
@@ -2,11 +2,16 @@
|
||||
|
||||
[](https://tinyfilemanager.github.io/demo/)
|
||||
[](https://github.com/prasathmani/tinyfilemanager/wiki)
|
||||
[](https://github.com/prasathmani/tinyfilemanager/releases)
|
||||
[](https://github.com/prasathmani/tinyfilemanager/releases)
|
||||
[](https://github.com/prasathmani/tinyfilemanager/blob/master/LICENSE)
|
||||
[](https://www.paypal.me/prasathmani)
|
||||

|
||||
|
||||
> TinyFileManager is web based file manager and it is a simple, fast and small file manager with a single file, multi-language ready web application for storing, uploading, editing and managing files and folders online via web browser. The Application runs on PHP 5.5+, It allows the creation of multiple users and each user can have its own directory and a build-in support for managing text files with cloud9 IDE and it supports syntax highlighting for over 150+ languages and over 35+ themes.
|
||||
> TinyFileManager is a versatile web-based PHP file manager designed for simplicity and efficiency. This lightweight single-file PHP application can be effortlessly integrated into any server directory, allowing users to store, upload, edit, and manage files and folders directly through their web browser.
|
||||
With multi-language support and compatibility with PHP 5.5+, TinyFileManager enables the creation of individual user accounts, each with its dedicated directory. The platform also includes built-in functionality for handling text files using the Cloud9 IDE.
|
||||
Featuring syntax highlighting for over 150 languages and more than 35 themes, TinyFileManager offers a comprehensive solution for file management in an online environment.
|
||||
|
||||
<sub>**Caution!** _Avoid utilizing this script as a standard file manager in public spaces. It is imperative to remove this script from the server after completing any tasks._</sub>
|
||||
|
||||
## Demo
|
||||
|
||||
@@ -37,92 +42,34 @@ Default username/password: **admin/admin@123** and **user/12345**.
|
||||
|
||||
To enable/disable authentication set `$use_auth` to true or false.
|
||||
|
||||
:information_source: Rename the `config-sample.php` file into `config.php` to use configuration, it is an additional configuration file, Feel free to remove completely this file and configure "tinyfilemanager.php" as a single file application.
|
||||
:information_source: Add your own configuration file [config.php](https://tinyfilemanager.github.io/config-sample.txt) in the same folder to use as additional configuration file.
|
||||
|
||||
:information_source: To work offline without CDN resources, use [offline](https://github.com/prasathmani/tinyfilemanager/tree/offline) branch
|
||||
|
||||
### :loudspeaker: Features
|
||||
|
||||
- :cd: Open Source, light and extremely simple
|
||||
- :iphone: Mobile friendly view for touch devices
|
||||
- :information_source: Basic features likes Create, Delete, Modify, View, Quick Preview, Download, Copy and Move files
|
||||
- :arrow_double_up: Ajax Upload, Ability to drag & drop, upload from URL, multiple files upload with file extensions filter
|
||||
- :file_folder: Ability to create folders and files
|
||||
- :gift: Ability to compress, extract files (`zip`, `tar`)
|
||||
- :sunglasses: Support user permissions - based on session and each user root folder mapping
|
||||
- :floppy_disk: Copy direct file URL
|
||||
- :pencil2: Cloud9 IDE - Syntax highlighting for over `150+` languages, Over `35+` themes with your favorite programming style
|
||||
- :page_facing_up: Google/Microsoft doc viewer helps you preview `PDF/DOC/XLS/PPT/etc`. 25 MB can be previewed with the Google Drive viewer
|
||||
- :zap: Backup files and IP blacklist and whitelist
|
||||
- :mag_right: Search - Search and filter files using `datatable js`
|
||||
- :file_folder: Exclude folders and files from listing
|
||||
- :globe_with_meridians: Multi-language(20+) support and for translations `translation.json` is file required
|
||||
- :bangbang: lots more...
|
||||
- :cd: **Open Source:** Lightweight, minimalist, and extremely simple to set up.
|
||||
- :iphone: **Mobile Friendly:** Optimized for touch devices and mobile viewing.
|
||||
- :information_source: **Core Features:** Easily create, delete, modify, view, download, copy, and move files.
|
||||
- :arrow_double_up: **Advanced Upload Options:** Ajax-powered uploads with drag-and-drop support, URL imports, and multi-file uploads with extension filtering.
|
||||
- :file_folder: **Folder & File Management:** Create and organize folders and files effortlessly.
|
||||
- :gift: **Compression Tools:** Compress and extract files in `zip` and `tar` formats.
|
||||
- :sunglasses: **User Permissions:** User-specific root folder mapping and session-based access control.
|
||||
- :floppy_disk: **Direct URLs:** Easily copy direct URLs for files.
|
||||
- :pencil2: **Code Editor:** Includes Cloud9 IDE with syntax highlighting for 150+ languages and 35+ themes.
|
||||
- :page_facing_up: **Document Preview:** Google/Microsoft document viewer for PDF/DOC/XLS/PPT, supporting previews up to 25 MB.
|
||||
- :zap: **Security Features:** Backup capabilities, IP blacklisting, and whitelisting.
|
||||
- :mag_right: **Search Functionality:** Use `datatable.js` for fast file search and filtering.
|
||||
- :file_folder: **Customizable Listings:** Exclude specific folders and files from directory views.
|
||||
- :globe_with_meridians: **Multi-language Support:** Translations available in 35+ languages with `translation.json`.
|
||||
- :bangbang: **And Much More!**
|
||||
|
||||
## Deploy by Docker
|
||||
|
||||
Make sure you have **already installed docker**, [Install reference](https://docs.docker.com/engine/install/)
|
||||
|
||||
> **Notice:** Your need an absolute path, and it will be served by tinyfilemanager.
|
||||
>
|
||||
> If you want to serve this project at **raspberry pi or another special platform**, you can download project and **build image by yourself**.
|
||||
|
||||
You can execute this following commands:
|
||||
|
||||
```shell
|
||||
$ docker run -d -v /absolute/path:/var/www/html/data -p 80:80 --restart=always --name tinyfilemanager tinyfilemanager/tinyfilemanager:master
|
||||
$ docker ps
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
648dfba9c0ff tinyfilemanager/tinyfilemanager:master "docker-php-entrypoi…" 4 minutes ago Up 4 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp tinyfilemanager
|
||||
```
|
||||
Access `http://127.0.0.1/` and enter default username and password, then enjoy it.
|
||||
|
||||
DockerHub: [https://hub.docker.com/r/tinyfilemanager/tinyfilemanager](https://hub.docker.com/r/tinyfilemanager/tinyfilemanager)
|
||||
|
||||
#### How to change config within docker
|
||||
|
||||
**Important!!!** First, you can copy `config-sample.php` to `config.php`, and must modify this following config
|
||||
|
||||
Origin:
|
||||
|
||||
```php
|
||||
// Root path for file manager
|
||||
// use absolute path of directory i.e: '/var/www/folder' or $_SERVER['DOCUMENT_ROOT'].'/folder'
|
||||
$root_path = $_SERVER['DOCUMENT_ROOT'];
|
||||
|
||||
// Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder'
|
||||
// Will not working if $root_path will be outside of server document root
|
||||
$root_url = '';
|
||||
```
|
||||
|
||||
Modified:
|
||||
|
||||
```php
|
||||
// Root path for file manager
|
||||
// use absolute path of directory i.e: '/var/www/folder' or $_SERVER['DOCUMENT_ROOT'].'/folder'
|
||||
$root_path = $_SERVER['DOCUMENT_ROOT'].'/data';
|
||||
|
||||
// Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder'
|
||||
// Will not working if $root_path will be outside of server document root
|
||||
$root_url = 'data/';
|
||||
```
|
||||
|
||||
Then, change another config what you want, and add a new volume `-v /absolute/path/config.php:/var/www/html/config.php` in `docker run` command, like this:
|
||||
|
||||
```shell
|
||||
$ docker run -d -v /absolute/path:/var/www/html/data -v /absolute/path/config.php:/var/www/html/config.php -p 80:80 --restart=always --name tinyfilemanager tinyfilemanager/tinyfilemanager:master
|
||||
```
|
||||
|
||||
#### Stop running
|
||||
|
||||
If you want to stop a running docker service, or you want to restart a service, you should stop it first, or you got `docker: Error response from daemon: Conflict. The container name "/tinyfilemanager" is already in use by container ...` problem. You can execute this command:
|
||||
|
||||
```shell
|
||||
$ docker rm -f tinyfilemanager
|
||||
```
|
||||
### [Deploy by Docker](https://github.com/prasathmani/tinyfilemanager/wiki/Deploy-by-Docker)
|
||||
|
||||
### <a name=license></a>License, Credit
|
||||
|
||||
- Available under the [GNU license](https://github.com/prasathmani/tinyfilemanager/blob/master/LICENSE)
|
||||
- Original concept and development by github.com/alexantr/filemanager
|
||||
- CDN Used - _jQuery, Bootstrap, Font Awesome, Highlight js, ace js, DropZone js, ekko-lightbox js, and DataTable js_
|
||||
- CDN Used - _jQuery, Bootstrap, Font Awesome, Highlight js, ace js, DropZone js, and DataTable js_
|
||||
- To report a bug or request a feature, please file an [issue](https://github.com/prasathmani/tinyfilemanager/issues)
|
||||
- [Contributors](https://github.com/prasathmani/tinyfilemanager/wiki/Authors-and-Contributors)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
The team takes security bugs seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.
|
||||
|
||||
To report a security issue, email ccpprogrammers[at]gmail.com and include the word "SECURITY" in the subject line.
|
||||
To report a security issue, email ccpprogrammers[at]gmail[dot]com and include the word "SECURITY" in the subject line.
|
||||
|
||||
The team will send a response indicating the next steps in handling your report. After the initial reply to your report you will be kept informed of the progress towards a fix and full announcement.
|
||||
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
#################################################################################################################
|
||||
This is an OPTIONAL configuration file. rename this file into config.php to use this configuration
|
||||
The role of this file is to make updating of "tinyfilemanager.php" easier.
|
||||
So you can:
|
||||
-Feel free to remove completely this file and configure "tinyfilemanager.php" as a single file application.
|
||||
or
|
||||
-Put inside this file all the static configuration you want and forgot to configure "tinyfilemanager.php".
|
||||
#################################################################################################################
|
||||
*/
|
||||
|
||||
// Auth with login/password
|
||||
// set true/false to enable/disable it
|
||||
// Is independent from IP white- and blacklisting
|
||||
$use_auth = true;
|
||||
|
||||
// Login user name and password
|
||||
// Users: array('Username' => 'Password', 'Username2' => 'Password2', ...)
|
||||
// Generate secure password hash - https://tinyfilemanager.github.io/docs/pwd.html
|
||||
$auth_users = array(
|
||||
'admin' => '$2y$10$/K.hjNr84lLNDt8fTXjoI.DBp6PpeyoJ.mGwrrLuCZfAwfSAGqhOW', //admin@123
|
||||
'user' => '$2y$10$Fg6Dz8oH9fPoZ2jJan5tZuv6Z4Kp7avtQ9bDfrdRntXtPeiMAZyGO' //12345
|
||||
);
|
||||
|
||||
// Readonly users
|
||||
// e.g. array('users', 'guest', ...)
|
||||
$readonly_users = array(
|
||||
'user'
|
||||
);
|
||||
|
||||
// Enable highlight.js (https://highlightjs.org/) on view's page
|
||||
$use_highlightjs = true;
|
||||
|
||||
// highlight.js style
|
||||
// for dark theme use 'ir-black'
|
||||
$highlightjs_style = 'vs';
|
||||
|
||||
// Enable ace.js (https://ace.c9.io/) on view's page
|
||||
$edit_files = true;
|
||||
|
||||
// Default timezone for date() and time()
|
||||
// Doc - http://php.net/manual/en/timezones.php
|
||||
$default_timezone = 'Etc/UTC'; // UTC
|
||||
|
||||
// Root path for file manager
|
||||
// use absolute path of directory i.e: '/var/www/folder' or $_SERVER['DOCUMENT_ROOT'].'/folder'
|
||||
$root_path = $_SERVER['DOCUMENT_ROOT'];
|
||||
|
||||
// Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder'
|
||||
// Will not working if $root_path will be outside of server document root
|
||||
$root_url = '';
|
||||
|
||||
// Server hostname. Can set manually if wrong
|
||||
$http_host = $_SERVER['HTTP_HOST'];
|
||||
|
||||
// user specific directories
|
||||
// array('Username' => 'Directory path', 'Username2' => 'Directory path', ...)
|
||||
$directories_users = array();
|
||||
|
||||
// input encoding for iconv
|
||||
$iconv_input_encoding = 'UTF-8';
|
||||
|
||||
// date() format for file modification date
|
||||
// Doc - https://www.php.net/manual/en/datetime.format.php
|
||||
$datetime_format = 'd.m.y H:i:s';
|
||||
|
||||
// Allowed file extensions for create and rename files
|
||||
// e.g. 'txt,html,css,js'
|
||||
$allowed_file_extensions = '';
|
||||
|
||||
// Allowed file extensions for upload files
|
||||
// e.g. 'gif,png,jpg,html,txt'
|
||||
$allowed_upload_extensions = '';
|
||||
|
||||
// Favicon path. This can be either a full url to an .PNG image, or a path based on the document root.
|
||||
// full path, e.g http://example.com/favicon.png
|
||||
// local path, e.g images/icons/favicon.png
|
||||
$favicon_path = '';
|
||||
|
||||
// Files and folders to excluded from listing
|
||||
// e.g. array('myfile.html', 'personal-folder', '*.php', ...)
|
||||
$exclude_items = array('');
|
||||
|
||||
// Online office Docs Viewer
|
||||
// Availabe rules are 'google', 'microsoft' or false
|
||||
// google => View documents using Google Docs Viewer
|
||||
// microsoft => View documents using Microsoft Web Apps Viewer
|
||||
// false => disable online doc viewer
|
||||
$online_viewer = 'google';
|
||||
|
||||
// Sticky Nav bar
|
||||
// true => enable sticky header
|
||||
// false => disable sticky header
|
||||
$sticky_navbar = true;
|
||||
|
||||
|
||||
// max upload file size
|
||||
$max_upload_size_bytes = 5000;
|
||||
|
||||
// Possible rules are 'OFF', 'AND' or 'OR'
|
||||
// OFF => Don't check connection IP, defaults to OFF
|
||||
// AND => Connection must be on the whitelist, and not on the blacklist
|
||||
// OR => Connection must be on the whitelist, or not on the blacklist
|
||||
$ip_ruleset = 'OFF';
|
||||
|
||||
// Should users be notified of their block?
|
||||
$ip_silent = true;
|
||||
|
||||
// IP-addresses, both ipv4 and ipv6
|
||||
$ip_whitelist = array(
|
||||
'127.0.0.1', // local ipv4
|
||||
'::1' // local ipv6
|
||||
);
|
||||
|
||||
// IP-addresses, both ipv4 and ipv6
|
||||
$ip_blacklist = array(
|
||||
'0.0.0.0', // non-routable meta ipv4
|
||||
'::' // non-routable meta ipv6
|
||||
);
|
||||
|
||||
?>
|
||||
BIN
screenshot.gif
BIN
screenshot.gif
Binary file not shown.
|
Before Width: | Height: | Size: 209 KiB After Width: | Height: | Size: 2.4 MiB |
4409
tinyfilemanager.php
4409
tinyfilemanager.php
File diff suppressed because one or more lines are too long
1333
translation.json
1333
translation.json
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user