@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | } |
129 | 129 | $this->fileInputName = md5($this->name); |
130 | 130 | if (!array_key_exists('file_param', $this->url)) { |
131 | - $this->url['file_param'] = $this->fileInputName;//服务器需要通过这个判断是哪一个input name上传的 |
|
131 | + $this->url['file_param'] = $this->fileInputName; //服务器需要通过这个判断是哪一个input name上传的 |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | $this->clientOptions = ArrayHelper::merge($this->clientOptions, [ |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | protected function formatAttachment($attachment) |
159 | 159 | { |
160 | 160 | if (!empty($attachment) && is_string($attachment)) { |
161 | - return ['url' => $attachment, 'path' => $attachment,]; |
|
161 | + return ['url' => $attachment, 'path' => $attachment, ]; |
|
162 | 162 | } else if (is_array($attachment)) { |
163 | 163 | return $attachment; |
164 | 164 | } else if ($attachment instanceof Arrayable) |
@@ -161,8 +161,9 @@ |
||
161 | 161 | return ['url' => $attachment, 'path' => $attachment,]; |
162 | 162 | } else if (is_array($attachment)) { |
163 | 163 | return $attachment; |
164 | - } else if ($attachment instanceof Arrayable) |
|
165 | - return $attachment->toArray(); |
|
164 | + } else if ($attachment instanceof Arrayable) { |
|
165 | + return $attachment->toArray(); |
|
166 | + } |
|
166 | 167 | return []; |
167 | 168 | } |
168 | 169 |