调整文件上传 safe 类型2 # Anyon

This commit is contained in:
Anyon 2020-03-28 11:03:20 +08:00
parent daf5fcc90a
commit 0f13f8145b

View File

@ -57,7 +57,7 @@ class Upload extends Controller
*/
public function state()
{
list($this->name, $this->safe) = [input('name', null), boolval(input('safe'))];
list($this->name, $this->safe) = [input('name', null), intval(input('safe'))];
$data = ['uptype' => $this->getType(), 'xkey' => input('xkey'), 'safe' => $this->safe];
if ($info = Storage::instance($data['uptype'])->info($data['xkey'], $this->safe, $this->name)) {
$data['url'] = $info['url'];