comparison 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
comparison
equal deleted inserted replaced
3160:330e8c81f6af 3161:887a8100343a
69 $store_file_name = $CONFIG_STORE_DIR . '/store-' . hash('sha256', $upload_file_name); 69 $store_file_name = $CONFIG_STORE_DIR . '/store-' . hash('sha256', $upload_file_name);
70 70
71 $request_method = $_SERVER['REQUEST_METHOD']; 71 $request_method = $_SERVER['REQUEST_METHOD'];
72 72
73 if(array_key_exists('v2', $_GET) === TRUE && $request_method === 'PUT') { 73 if(array_key_exists('v2', $_GET) === TRUE && $request_method === 'PUT') {
74 $upload_file_size = $_SERVER['HTTP_CONTENT_LENGTH']; 74 $upload_file_size = $_SERVER['CONTENT_LENGTH'];
75 $upload_token = $_SERVER['HTTP_UPLOAD_SIGNATURE']; 75 $upload_token = $_GET['v2'];
76 76
77 if(array_key_exists('HTTP_CONTENT_TYPE', $_SERVER) === TRUE) { 77 if(array_key_exists('CONTENT_TYPE', $_SERVER) === TRUE) {
78 $upload_file_type = $_SERVER['HTTP_CONTENT_TYPE']; 78 $upload_file_type = $_SERVER['CONTENT_TYPE'];
79 } else { 79 } else {
80 $upload_file_type = 'application/octet-stream'; 80 $upload_file_type = 'application/octet-stream';
81 } 81 }
82 82
83 // Imagine being able to store the file data in the content-type! 83 // Imagine being able to store the file data in the content-type!