diff --git a/api/index.php b/api/index.php index 558116f..1c5efa0 100755 --- a/api/index.php +++ b/api/index.php @@ -1,5 +1,5 @@ uploaded) { // 上传成功后返回json数据 $imageUrl = $config['imgurl'] . config_path() . $handle->file_dst_name; $delUrl = $config['domain'] . '/application/del.php?hash=' . urlHash(config_path() . $handle->file_dst_name, 0); - $reJson = array( "result" => "success", "code" => 200, "url" => $imageUrl, + "thumb" => $config['domain'] . '/application/thumb.php?img=' . config_path() . $handle->file_dst_name . '&width=300&height=300', "del" => $delUrl, ); - echo json_encode($reJson,JSON_UNESCAPED_UNICODE); + echo json_encode($reJson, JSON_UNESCAPED_UNICODE); $handle->clean(); } else { // 上传错误 code:403 客户端文件有问题 @@ -102,8 +102,6 @@ if ($handle->uploaded) { //"log" => $handle->log, ); - unset($handle); - header('Content-Type:application/json; charset=utf-8'); exit(json_encode($reJson, JSON_UNESCAPED_UNICODE)); } @@ -113,9 +111,5 @@ if ($handle->uploaded) { @write_log(config_path() . $handle->file_dst_name, $handle->file_src_name, $handle->file_dst_pathname, $handle->file_src_size, "API upload"); } - // 创建缩略图 - if ($config['thumbnail']) { - @creat_thumbnail_images($handle->file_dst_name); - } unset($handle); } diff --git a/install/install.lock b/install/install.lock new file mode 100755 index 0000000..a491d9a --- /dev/null +++ b/install/install.lock @@ -0,0 +1 @@ +安装程序锁定文件。 \ No newline at end of file