From 65c19e72c91aeb95fa477f1e60f0ea57045ad93f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E7=9F=B3=E5=A4=B4?= Date: Fri, 5 Apr 2024 18:07:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=93=E5=8F=96=E9=99=84=E4=BB=B6=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=B8=85=E7=90=86url=E7=9A=84#=E5=90=8E=E7=BB=AD?= =?UTF-8?q?=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "NewLife.Cube/Entity/\351\231\204\344\273\266.Biz.cs" | 4 ++++ 1 file changed, 4 insertions(+) diff --git "a/NewLife.Cube/Entity/\351\231\204\344\273\266.Biz.cs" "b/NewLife.Cube/Entity/\351\231\204\344\273\266.Biz.cs" index c8d69e6c..2d02fcc0 100644 --- "a/NewLife.Cube/Entity/\351\231\204\344\273\266.Biz.cs" +++ "b/NewLife.Cube/Entity/\351\231\204\344\273\266.Biz.cs" @@ -181,6 +181,10 @@ public async Task Fetch(String url, String uploadPath = null, String fi { if (url.IsNullOrEmpty()) return false; + // 清理url的#后续部分 + var p = url.IndexOf('#'); + if (p > 0) url = url[..p]; + // 提前生成雪花Id,用于保存文件 var isNew = Id == 0; if (Id == 0) Id = Meta.Factory.Snow.NewId();