diff mod_http_upload_external/share_v2.php @ 3161:887a8100343a

share_v2.php: Fix array keys
author Matthew Wild <mwild1@gmail.com>
date Mon, 02 Jul 2018 12:52:59 +0100
parents ac99a04231b1
children 3797be8f491f
line wrap: on
line diff
--- a/mod_http_upload_external/share_v2.php	Mon Jul 02 10:14:13 2018 +0200
+++ b/mod_http_upload_external/share_v2.php	Mon Jul 02 12:52:59 2018 +0100
@@ -71,11 +71,11 @@
 $request_method = $_SERVER['REQUEST_METHOD'];
 
 if(array_key_exists('v2', $_GET) === TRUE && $request_method === 'PUT') {
-	$upload_file_size = $_SERVER['HTTP_CONTENT_LENGTH'];
-	$upload_token = $_SERVER['HTTP_UPLOAD_SIGNATURE'];
+	$upload_file_size = $_SERVER['CONTENT_LENGTH'];
+	$upload_token = $_GET['v2'];
 
-	if(array_key_exists('HTTP_CONTENT_TYPE', $_SERVER) === TRUE) {
-		$upload_file_type = $_SERVER['HTTP_CONTENT_TYPE'];
+	if(array_key_exists('CONTENT_TYPE', $_SERVER) === TRUE) {
+		$upload_file_type = $_SERVER['CONTENT_TYPE'];
 	} else {
 		$upload_file_type = 'application/octet-stream';
 	}