dever 5 years ago
parent
commit
09038630c1
1 changed files with 6 additions and 1 deletions
  1. 6 1
      lib/Store/Core.php

+ 6 - 1
lib/Store/Core.php

@@ -209,7 +209,12 @@ class Core
 				header('Content-type: text/json; charset=utf-8');
 				$path = Dever::path($this->base, 'tmp/');
 				
-				$this->ext = '.' . pathinfo($name, PATHINFO_EXTENSION);
+				$ext = $name;
+				if (strstr($name, '?')) {
+					$temp = explode('?', $ext);
+					$ext = $temp[0];
+				}
+				$this->ext = '.' . pathinfo($ext, PATHINFO_EXTENSION);
 				$this->data['file']['name'] = 'Tmp' . sha1($name);
 				$this->data['file']['tmp_name'] = $path . $this->data['file']['name'];