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); } /**