From 29a1c31093450ed43754cd39b20016d573abeba7 Mon Sep 17 00:00:00 2001 From: "Morning.Chen" Date: Tue, 20 Sep 2022 18:33:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=94=A8PUT=EF=BC=9B=E4=BF=AE=E6=94=B9=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fanruan/hihidata/datasource/server/DatasourceOperation.java | 2 +- .../com/fanruan/hihidata/datasource/server/http/HttpKits.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/fanruan/hihidata/datasource/server/DatasourceOperation.java b/src/main/java/com/fanruan/hihidata/datasource/server/DatasourceOperation.java index bd9ff94..699a6ff 100644 --- a/src/main/java/com/fanruan/hihidata/datasource/server/DatasourceOperation.java +++ b/src/main/java/com/fanruan/hihidata/datasource/server/DatasourceOperation.java @@ -59,7 +59,7 @@ public class DatasourceOperation { JSONObject body = new JSONObject(); body.put("tableId", tableId); HttpEntity entity = new StringEntity(body.toString(), StandardCharsets.UTF_8); - String res = HttpKits.post(String.format("%s/api/v1/datasource/table/upload/url", ProjectConstants.BASE_URI), headers(), entity); + String res = HttpKits.post(String.format("%s/api/v1/datasource/upload/url", ProjectConstants.BASE_URI), headers(), entity); JSONObject data = new JSONObject(res); return data.getString("data"); } diff --git a/src/main/java/com/fanruan/hihidata/datasource/server/http/HttpKits.java b/src/main/java/com/fanruan/hihidata/datasource/server/http/HttpKits.java index 29f8e7d..b0f12b1 100644 --- a/src/main/java/com/fanruan/hihidata/datasource/server/http/HttpKits.java +++ b/src/main/java/com/fanruan/hihidata/datasource/server/http/HttpKits.java @@ -254,7 +254,7 @@ public class HttpKits { * @throws IOException 上传中出现错误则抛出此异常 */ public static void upload(String url, FileEntity fileEntity, Charset charset) throws IOException { - upload(url, fileEntity, charset, Collections.emptyMap(), HttpRequestType.POST); + upload(url, fileEntity, charset, Collections.emptyMap(), HttpRequestType.PUT); } /**