Skip to content

Commit 7567d91

Browse files
committed
Merge pull request #5 from Purecis/fix-404-error-in-upload
update server side flow to act with new flow version by returning 204…
2 parents 2e9e920 + 2befd85 commit 7567d91

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

system/module/chunkUpload.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ public static function init($config = array()){
6161
self::$config = array();
6262
self::$config['tempDir'] = isset($config['tempDir'])?$config['tempDir']:"temp";
6363
self::$config['hashChunk'] = isset($config['hashChunk'])?$config['hashChunk']:true;
64-
self::$config['deleteChunksOnSave'] = isset($config['deleteChunksOnSave'])?$config['deleteChunksOnSave']:true;
64+
self::$config['deleteChunksOnSave'] = isset($config['deleteChunksOnSave'])?$config['deleteChunksOnSave']:true;
65+
self::$config['flowNewVersion'] = isset($config['flowNewVersion'])?$config['flowNewVersion']:true;
6566
}
6667

6768
// --------------------------------------------------------------------
@@ -78,7 +79,11 @@ public static function GET(){
7879
if (self::checkChunk()) {
7980
header("HTTP/1.1 200 Ok");
8081
} else {
81-
header("HTTP/1.1 404 Not Found");
82+
if(self::$config['flowNewVersion']){
83+
header("HTTP/1.1 204 No Content");
84+
}else{
85+
header("HTTP/1.1 404 Not Found");
86+
}
8287
exit;
8388
}
8489
}

0 commit comments

Comments
 (0)