dever hace 5 años
padre
commit
09038630c1
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  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'];