From d59b81f11df990c7710378f9d9b0341fc89276e9 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 31 Oct 2020 19:57:14 +0000 Subject: if restarting a previously interrupted upload just return where we ended - fix issue #1485 --- include/attach.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/attach.php b/include/attach.php index 80f71b9ea..c9649a4ce 100644 --- a/include/attach.php +++ b/include/attach.php @@ -2807,6 +2807,12 @@ function save_chunk($channel,$start,$end,$len) { $new_path = $new_base . '/' . $_FILES['files']['name']; + if(file_exists($new_path) && intval($start) === 0) { + $result['partial'] = true; + $result['length'] = intval(filesize($new_path)); + return $result; + } + if(! file_exists($new_path)) { rename($tmp_path,$new_path); } -- cgit v1.2.3