From d2c4ce24098a092207596ab569f8b159a3ec4628 Mon Sep 17 00:00:00 2001 From: wushuo Date: Thu, 14 Nov 2024 02:52:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=86=85=E5=AD=98=E6=BA=A2?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/ani/rss/util/AlistUtil.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/ani/rss/util/AlistUtil.java b/src/main/java/ani/rss/util/AlistUtil.java index e8de4bc1..7cc403b3 100644 --- a/src/main/java/ani/rss/util/AlistUtil.java +++ b/src/main/java/ani/rss/util/AlistUtil.java @@ -94,6 +94,7 @@ public static void upload(TorrentsInfo torrentsInfo) { .header(Header.AUTHORIZATION, alistToken) .header("As-Task", "true") .header("File-Path", URLUtil.encode(finalFilePath)) + .header(Header.CONTENT_LENGTH, String.valueOf(file.length())) .body(new InputStreamResource(inputStream)) .then(res -> { Assert.isTrue(res.isOk(), "上传失败 {} 状态码:{}", string, res.getStatus());