Skip to content

Commit

Permalink
抓取附件时,清理url的#后续部分
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Apr 5, 2024
1 parent a024084 commit 65c19e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions NewLife.Cube/Entity/附件.Biz.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ public async Task<Boolean> 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();
Expand Down

0 comments on commit 65c19e7

Please sign in to comment.