diff options
author | Mario <mario@mariovavti.com> | 2020-10-31 19:57:14 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-10-31 19:57:14 +0000 |
commit | d59b81f11df990c7710378f9d9b0341fc89276e9 (patch) | |
tree | b99a74c5f16b1f373d75dcec90dbf964ba6fe361 | |
parent | b11d2c376b130b33589f381be9d5d55b32d9a7cb (diff) | |
download | volse-hubzilla-d59b81f11df990c7710378f9d9b0341fc89276e9.tar.gz volse-hubzilla-d59b81f11df990c7710378f9d9b0341fc89276e9.tar.bz2 volse-hubzilla-d59b81f11df990c7710378f9d9b0341fc89276e9.zip |
if restarting a previously interrupted upload just return where we ended - fix issue #1485
-rw-r--r-- | include/attach.php | 6 |
1 files changed, 6 insertions, 0 deletions
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); } |