-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prevent overwriting if uploaded file already exists #138,
IE11 aborts upload after 30s #137
- Loading branch information
Prasath Mani
committed
Mar 13, 2019
1 parent
6222640
commit a8c2fc6
Showing
2 changed files
with
9 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,13 @@ | |
$CONFIG = '{"lang":"en","error_reporting":false,"show_hidden":false}'; | ||
|
||
/** | ||
* H3K | Tiny File Manager V2.3.2 | ||
* H3K | Tiny File Manager V2.3.3 | ||
* CCP Programmers | [email protected] | ||
* https://tinyfilemanager.github.io | ||
*/ | ||
|
||
//TFM version | ||
define('VERSION', '2.3.2'); | ||
define('VERSION', '2.3.3'); | ||
|
||
// Auth with login/password (set true/false to enable/disable it) | ||
$use_auth = true; | ||
|
@@ -641,6 +641,11 @@ function get_file_path () { | |
$fullPath = $path . '/' . $_REQUEST['fullpath']; | ||
$folder = substr($fullPath, 0, strrpos($fullPath, "/")); | ||
|
||
if(file_exists ($fullPath)) { | ||
$ext_1 = $ext ? '.'.$ext : ''; | ||
$fullPath = str_replace($ext_1, '', $fullPath) .'_'. date('ymdHis'). $ext_1; | ||
} | ||
|
||
if (!is_dir($folder)) { | ||
$old = umask(0); | ||
mkdir($folder, 0777, true); | ||
|
@@ -943,7 +948,7 @@ function get_file_path () { | |
this.on("sending", function (file, xhr, formData) { | ||
let _path = (file.fullPath) ? file.fullPath : file.name; | ||
document.getElementById("fullpath").value = _path; | ||
xhr.ontimeout = (() => { | ||
xhr.ontimeout = (function() { | ||
alert('Error: Server Timeout'); | ||
}); | ||
}).on("success", function (res) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"appName": "Tiny File Manager", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"language": [ | ||
{ | ||
"name": "русский", | ||
|