dever 6 years ago
parent
commit
90d63702cc
1 changed files with 15 additions and 3 deletions
  1. 15 3
      src/Save.php

+ 15 - 3
src/Save.php

@@ -23,10 +23,22 @@ class Save
 		
 		//file_put_contents(DEVER_PATH . 'web/data/upload.txt', var_export($image, true)); 
 		if ($image['file']) {
-			$handle = new Handle($image);
 
-			$this->output = $handle->copy();
-			unset($this->output['file']);
+			if (is_array($image['file'])) {
+				$send = $image;
+				foreach($image['file'] as $k => $v) {
+					$send['file'] = $v;
+					$handle = new Handle($send);
+					$output = $handle->copy();
+					unset($output['file']);
+					$this->output[] = $output;
+				}
+			} else {
+				$handle = new Handle($image);
+
+				$this->output = $handle->copy();
+				unset($this->output['file']);
+			}
 		}
 	}