Compare commits

...

82 commits

Author SHA1 Message Date
BANKA2017 a1ae0fa729
fix: #52 Does not respect directory tree while uploading a folder containing sub-folders (#1056) 2024-05-01 10:01:27 +05:30
Torusrxxx ca4b1b1743
Disable excluded extension name from viewing (#1151) 2024-03-25 11:09:24 +05:30
Michele Locati 8e87afae5b
Fix wrong phpdoc of print_external() (#1091) 2023-09-14 15:05:36 +05:30
Tony Ganesh Prajapati 43063e4746
Update tinyfilemanager.php (#1086)
changing String "Filter" to "Search"
2023-08-28 12:29:45 +05:30
AJ.Bassa 47359d3f4e
Update translation.json (#1083)
Updated Dutch translation
2023-08-11 01:14:37 +05:30
paponius eb8f3d80bc
random_bytes() only for >PHP7 (#1066) 2023-06-29 07:31:24 +05:30
ner0 f380478197
Typo & make text bold (#1042)
* Fix typo

* Make text bold for consistency

Also dropping the plural 's'
2023-05-16 08:17:43 +05:30
divinity76 f7a2f77008
reduce feof() calls (#1041)
micro-optimization: when doing large file copies, this will reduce the number of feof() calls. for example, if copying 100MB, this will save approximately 25,599 feof() calls (255 feof() calls for every MB) - also feofs() may do an actual syscall, and syscalls are relatively expensive/time-consuming.
2023-05-15 09:53:25 +05:30
Bryan dabc4ea36e
Fix highlightjs_style in config.php being ignored (#1039)
highlightjs_style variable is being used before config.php gets parsed, so preview style is always vs. This PR fixes that by moving config.php parsing to be before external resource calls.
2023-05-11 09:55:15 +05:30
ner0 7ec19c1659
Resize preview image and implement zoom in/out (#1036)
* Resize preview image and implement zoom in/out

* Remove redundant class name
2023-05-03 14:11:59 +05:30
DannyDaemonic 8486c7a240
Add configurable path display modes for better privacy and clarity (#1034) 2023-04-26 20:46:52 +05:30
xololunatic 8194249b66
login (Redirecting to Main domain of website instead of tfm.php) fix (#1031)
When logged in it takes to the website's main URL. For example, if I have tfm in www.example.com/tfm/index.php (index.php is tfm) then after logging in it redirects to www.example.com and then have to press back on the browser then it takes to www.example.com/tfm/index.php
2023-04-24 07:00:47 +05:30
Caleb Mazalevskis da77df785a
Fix typo. (#1028) 2023-04-23 19:59:23 +05:30
Micha Ober 00541fc469
Fix upload of existing files (#1026) 2023-04-21 19:21:31 +05:30
Joy Biswas 7ca87c9163
added bengali translation (#1018) 2023-04-21 10:06:09 +05:30
divinity76 f6a93653be
use stream_copy_to_stream (#1014)
* use stream_copy_to_stream

it's simpler, and should be faster.
For example, stream_copy_to_stream can use sendfile ( https://man7.org/linux/man-pages/man2/sendfile.2.html ) on operating systems supporting it, which is faster and use less RAM than fread()+fwrite() (because it avoids copying data to/from userland, doing the copy entirely in-kernel~)

* fix loop early return, and workaround bug

* use feof

ref https://github.com/prasathmani/tinyfilemanager/issues/1016#issuecomment-1502081506
2023-04-21 10:05:45 +05:30
Micha Ober 85f35bc28f
Check if posix_getpwuid/posix_getgrgid calls were successful (#1023) 2023-04-21 10:03:20 +05:30
divinity76 3a90a5916a
tell git to always commit .php in unix-newlines (#1017)
so hopefully we don't get a repeat of https://github.com/prasathmani/tinyfilemanager/pull/994#issuecomment-1502035505
2023-04-11 07:51:47 +05:30
ner0 6a6eb8abec
Prevent logout issue after page was cached (#1004)
Logout may not work otherwise, browser reloads cached page from disk instead of sending GET request ?logout=1 to server.
2023-03-31 04:16:23 +05:30
Prasath Mani bf024c7c84
Update tinyfilemanager.php 2023-03-17 10:22:19 +05:30
Sergiu Bivol d705da604c
Update Romanian translations (#981) 2023-02-26 21:18:19 +05:30
ssams 94f1c92d80
publish additional docker tags (#975) 2023-02-22 13:06:26 +05:30
Prasath Mani bbb2114918
Update README.md 2023-02-22 07:20:52 +05:30
Prasath Mani e071b2372c Add External CDN resources configurable 2023-02-22 07:16:25 +05:30
fwiesweg ba1b499d2b
Allow configuration for strict CSPs and GDPR (#971) 2023-02-22 06:25:35 +05:30
Suyadi 6775bcb176
AceEditor: hide vertical ruler (#973) 2023-02-22 06:24:00 +05:30
Alessandro Marinuzzi 4b2aef8737
Added extensions and removed the duplicated entries (#968)
added new extensions used in different linux/windows environments and removed duplicate entries
2023-02-16 20:54:55 +05:30
Michael Gebetsroither 1eed63cf1b
make upload chunk size configureable (#967)
nginx supports only 1MB per default
2023-02-16 16:18:40 +05:30
Oreloth 200d9d6d49
Fix french translation (#960)
Better and native french translation with official terms such as "haché" for hashing, which is the officiel term from PHP.
2023-02-05 10:35:07 +05:30
minghongg cddd7eaab0
Deploy path traversal fix (#953)
Co-authored-by: root <root@chevaliers.lan>
2023-01-25 11:46:20 +05:30
Dmitry Efremov dd1ba6795c
Fixes ajax ability to handle requests when auth disabled (#952) 2023-01-25 08:23:45 +05:30
Dmitry Efremov 9c4d30d7b5
Fixes couple issues with confirmDailog (#951)
* Fixes naming for confirmDailog id, otherwise dialog won't work

* Removes destroying form as browser complains that it can't process request from disconnected form
2023-01-25 08:22:27 +05:30
Dmitry Efremov 12baf03ef5
Removes sed from Dockerfile (#948)
They were needed before because they changed example config.php so make it workable.
Now we don't have it and running sed against main file just removes a lot of code
and forces data path for directory
2023-01-24 08:04:37 +05:30
Prasath Mani dc529dd590
Fix save settings not working #947 2023-01-22 02:06:14 +05:30
fbotp 69ccd952fc
Bug fix: Delete confirm dialog will work wrong aflter cancel. (#942)
* Bug fix: Only delete first file/directory when clicking the delete button multiple times and canceling.

* Add variable name for delete dialog
2023-01-19 21:41:48 +05:30
Catalin 69495db9b4
Subfolder links fix (#945)
Download and Direct link problems when using with a subfolder, possible simple solution.
2023-01-19 21:41:00 +05:30
Prasath Mani 313acf1b78
Update README.md 2023-01-13 11:09:18 +05:30
Prasath Mani ac672b832c
update screenshot 2022-12-03 12:07:18 +05:30
Prasath Mani 789b98f136 Download and Direct link problems when using with a subfolder. #907 2022-12-03 06:17:55 +00:00
Prasath Mani 97fd394a0f
Update README.md 2022-12-02 08:29:37 +05:30
Prasath Mani 8f2f65b9fc Bug Fix #904, #903, #900 2022-12-02 02:43:24 +00:00
武志伟 31b988db79
Translation supplement (#902)
* update zh-cn lang

* Translation supplement

* update zh-cn lang
2022-11-30 16:40:57 +05:30
武志伟 d09cc2f445
Complete all Chinese translations (#901) 2022-11-30 11:01:57 +05:30
Nguyễn Trần Chung 5a00707890
Update tinyfilemanager.php (#898) 2022-11-27 20:59:39 +05:30
muink cfb9a57d5e
Fix the problem of login failure when $root_url is defined (#896)
Fix the problem that `FM_ROOT_URL` and `$_SERVER['REQUEST_URI']` are repeated, causing login redirection to fail when `$root_url` is defined
2022-11-26 18:52:34 +05:30
Prasath Mani 652c05914f
Update FUNDING.yml 2022-11-25 16:38:42 +05:30
Prasath Mani e30ec1dfd2 update download buffer and fix #893 2022-11-25 07:00:19 +00:00
Prasath Mani 610cea8ecd Fix - #739, #887, #886, #884, #835 2022-11-25 03:09:46 +00:00
Michele Locati d4019e6e10
Update Italian translations (#892) 2022-11-23 22:10:29 +05:30
Michele Locati f20d3e9e06
Fix phpdoc types (#890) 2022-11-23 22:07:04 +05:30
Julien c4ab436f6d
Complete French translation (#885) 2022-11-22 06:27:33 +05:30
Prasath Mani e5c78e8ab9 cosmetic changes and dark theme color update 2022-11-20 19:01:08 +05:30
Prasath Mani f8cedbcf59 Fix Security related issues 2022-11-20 16:59:29 +05:30
Prasath Mani df80b73436 Refactor Code and Update Doc 2022-11-20 15:04:25 +05:30
Prasath Mani 8de16a4c8a Major update on security, improved UI and bug fix. 2022-11-19 19:55:39 +00:00
Prasath Mani 4d8d4a3aba
Update tinyfilemanager.php 2022-11-07 22:48:15 +05:30
Prasath Mani fce0f5bacb Fix warning message 2022-11-07 22:42:07 +05:30
llcool 59c6b9b26a
Downloading file - PHP warning loop "Permission denied" (#879)
* Bugfix: Stop looping error when downloading a file with no access.

* Delete .history directory

ignore .history
2022-11-07 22:24:56 +05:30
Rizky be49a13b8e
Fixes advanced search not working. (#878)
Fix #869
2022-11-07 22:23:01 +05:30
ririko5834 2c0e6d216e
Update tinyfilemanager.php (#874) 2022-10-31 21:19:21 +05:30
Prasath Mani 805308a013
remove latest version checker 2022-09-01 16:25:29 +05:30
Dmitry Efremov 2a2d81ce78
Removes php ext installs as their are already installed in base (#848) 2022-08-31 11:23:19 +05:30
Dmitry Efremov 2eb00ab3de
Adds json mime type as text type to allow edit json files (#841) 2022-08-25 09:50:39 +05:30
Agent Smith 74727fe48a
Add webm to videos (#833) 2022-08-06 11:17:47 +05:30
Andres Aya 6190ae69e9
word change mistranslated in Spanish (#818) 2022-07-14 09:01:59 +05:30
Sebjugate 3a3033bdce
Added .yml, .yaml and .toml extensions. (#816)
These are common config file extensions.
2022-07-14 07:16:02 +05:30
zedzhen afe1227caa
Update russia translate and fix bug (#815)
* fix bug

if $calc_folder is enabled and there are insufficient permissions for one of the subfolders, then "PHP Fatal error: Uncaught RuntimeException: SplFileInfo::getSize()"

* lng() update

added lng() and delete unesed

* update russia translate
2022-07-14 07:14:54 +05:30
Saied cda40e22f1
More accurate ip recognition (#807) (#813) 2022-07-14 07:13:49 +05:30
Michael Horstmann b24887d4fd
Removed unused function (#806)
To fix: Undefined constant 'FM_EXTENSION'
2022-07-07 12:01:02 +05:30
Prasath Mani 17de8af81b PHP "divide by zero" error when unzipping 0 byte (very small) .zip files #803 2022-06-29 02:14:35 +00:00
Apichart F 50ccd29623
Fix advanced search issue for read-only user (#785)
$_POST['type']=="search" not reachable if FM_READONLY is true
2022-05-27 11:06:25 +05:30
Tanner 04c1d45b5f
resolve sorting issues, keep back button at top (#779) 2022-05-05 03:51:21 +05:30
Prasath Mani ca94f23c47
Update tinyfilemanager.php 2022-04-18 12:51:55 +05:30
mclorch a65f8ff8b5
fix download Content-Type header (#770) 2022-04-11 13:39:51 +05:30
sinth 13b2bd0164
Add missing lines for German translation (#766)
* added missing lines for German translation

* small correction
2022-04-07 22:16:43 +05:30
luidoc ccf18947c8
Add Galician language (#747)
Add Galician language - gl
2022-03-20 12:48:48 +05:30
Rick van Leeuwen d4d620fe66
Fix Dutch translation (#745)
* Fix Dutch translation

* fix dutch translation
2022-03-20 12:47:03 +05:30
The-Exterminator 4d7078829d
Update translation.json (#742) 2022-03-07 08:47:58 +05:30
AnnAngela 7bd9483728
Fix incorrect path of the version svg (#740) 2022-03-06 19:38:08 +05:30
Agent Smith 179e13c4a6
Add danish language (#728) 2022-02-21 10:47:37 +05:30
Nguyễn Trần Chung 4ff141bb15
Update translation.json (#723) 2022-02-14 08:24:38 +05:30
Michael Milette 9b2bb18acb
Optimized and refactored fm_get_directorysize() function, and added validation. (#720) 2022-02-12 23:15:38 +05:30
9 changed files with 1651 additions and 1051 deletions

2
.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
*.php text eol=lf
*.json text eol=lf

2
.github/FUNDING.yml vendored
View file

@ -1,5 +1,5 @@
# These are supported funding model platforms
github: prasathmani
patreon: ccpprogrammers
open_collective: tinyfilemanager
ko_fi: tinyfilemanager

View file

@ -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 }}

View file

@ -17,16 +17,10 @@ RUN apk add \
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"]

View file

@ -2,11 +2,12 @@
[![Live demo](https://img.shields.io/badge/Live-Demo-brightgreen.svg?style=flat-square)](https://tinyfilemanager.github.io/demo/)
[![Live demo](https://img.shields.io/badge/Help-Docs-lightgrey.svg?style=flat-square)](https://github.com/prasathmani/tinyfilemanager/wiki)
[![GitHub Release](https://img.shields.io/github/release/qubyte/rubidium.svg?style=flat-square)](https://github.com/prasathmani/tinyfilemanager/releases)
[![GitHub Release](https://img.shields.io/github/release/prasathmani/tinyfilemanager.svg?style=flat-square)](https://github.com/prasathmani/tinyfilemanager/releases)
[![GitHub License](https://img.shields.io/github/license/prasathmani/tinyfilemanager.svg?style=flat-square)](https://github.com/prasathmani/tinyfilemanager/blob/master/LICENSE)
[![Paypal](https://img.shields.io/badge/Donate-Paypal-lightgrey.svg?style=flat-square)](https://www.paypal.me/prasathmani)
![GitHub Sponsors](https://img.shields.io/github/sponsors/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 web based PHP file manager and it is a simple, fast and small size in single-file PHP file that can be dropped into any folder on your server, 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.
## Demo
@ -37,13 +38,15 @@ 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
- :information_source: Basic features likes Create, Delete, Modify, View, 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`)
@ -54,7 +57,7 @@ To enable/disable authentication set `$use_auth` to true or false.
- :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
- :globe_with_meridians: Multi-language(32+) support and for translations `translation.json` is file required
- :bangbang: lots more...
## Deploy by Docker
@ -79,8 +82,6 @@ DockerHub: [https://hub.docker.com/r/tinyfilemanager/tinyfilemanager](https://hu
#### 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
@ -105,10 +106,10 @@ $root_path = $_SERVER['DOCUMENT_ROOT'].'/data';
$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:
Then, change another config what you want, and add a new volume `-v /absolute/path/index.php:/var/www/html/index.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
$ docker run -d -v /absolute/path:/var/www/html/data -v /absolute/path/index.php:/var/www/html/index.php -p 80:80 --restart=always --name tinyfilemanager tinyfilemanager/tinyfilemanager:master
```
#### Stop running
@ -123,6 +124,6 @@ $ docker rm -f tinyfilemanager
- 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)

View file

@ -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
);
?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 KiB

After

Width:  |  Height:  |  Size: 2.4 MiB

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff