You've already forked EasyImages2.0
mirror of
https://github.com/icret/EasyImages2.0.git
synced 2025-12-13 11:43:58 +08:00
增加回调提示与code码
This commit is contained in:
14
file.php
14
file.php
@@ -88,20 +88,24 @@ if ($handle->uploaded) {
|
||||
}
|
||||
|
||||
$reJson = array(
|
||||
"result" => 'success',
|
||||
"result" => "success",
|
||||
"code" => 200,
|
||||
"url" => $imageUrl,
|
||||
"del" => $delUrl,
|
||||
);
|
||||
echo json_encode($reJson);
|
||||
$handle->clean();
|
||||
} else {
|
||||
// 上传错误 返回错误信息
|
||||
// 上传错误 code:403 客户端文件有问题
|
||||
$reJson = array(
|
||||
"result" => 'failed',
|
||||
"result" => "failed",
|
||||
"code" => 403,
|
||||
"message" => $handle->error,
|
||||
"log" => $handle->log,
|
||||
//"log" => $handle->log,
|
||||
);
|
||||
echo json_encode($reJson, JSON_UNESCAPED_UNICODE);
|
||||
unset($handle);
|
||||
header('Content-Type:application/json; charset=utf-8');
|
||||
exit(json_encode($reJson, JSON_UNESCAPED_UNICODE));
|
||||
}
|
||||
|
||||
// 上传日志控制
|
||||
|
||||
Reference in New Issue
Block a user