[WIP] chat hub.
This commit is contained in:
parent
c8a3cc4be1
commit
7694620705
12 changed files with 239 additions and 226 deletions
|
|
@ -12,6 +12,7 @@ using Yavsc.Abstract.FileSystem;
|
|||
using Yavsc.Exceptions;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.FileSystem;
|
||||
using Yavsc.Models.Streaming;
|
||||
using Yavsc.ViewModels;
|
||||
|
||||
namespace Yavsc.Helpers
|
||||
|
|
@ -188,6 +189,16 @@ public static FileRecievedInfo ReceiveProSignature(this ClaimsPrincipal user, st
|
|||
return item;
|
||||
}
|
||||
|
||||
|
||||
public static string GetFileUrl (this LiveFlow flow)
|
||||
{
|
||||
if (flow.DifferedFileName==null)
|
||||
// no server-side backup for this stream
|
||||
return null;
|
||||
var fileInfo = new FileInfo(flow.DifferedFileName);
|
||||
var ext = fileInfo.Extension;
|
||||
var namelen = flow.DifferedFileName.Length - ext.Length;
|
||||
var basename = flow.DifferedFileName.Substring(0,namelen);
|
||||
return $"{Startup.UserFilesOptions.RequestPath}/{flow.Owner.UserName}/live/{basename}-{flow.SequenceNumber}{ext}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue