mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-15 19:22:19 +08:00
Web: fix file url
This commit is contained in:
parent
c059975165
commit
254978c43f
|
@ -60,6 +60,7 @@ namespace BililiveRecorder.Web.Api
|
|||
}
|
||||
else
|
||||
{
|
||||
var pathTrimmed = path.Trim('/');
|
||||
fileLikes.Add(new FileDto
|
||||
{
|
||||
Name = content.Name,
|
||||
|
@ -67,7 +68,7 @@ namespace BililiveRecorder.Web.Api
|
|||
Size = content.Length,
|
||||
|
||||
// Path.Combine 在 Windows 上会用 \
|
||||
Url = "/file/" + path.Trim('/') + '/' + content.Name,
|
||||
Url = "/file/" + (pathTrimmed.Length > 0 ? pathTrimmed + '/' : string.Empty) + content.Name,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user