mirror of
https://github.com/bitwarden/server
synced 2025-12-29 06:33:43 +00:00
Send APIs (#979)
* send work * fix sql proj file * update * updates * access id * delete job * fix delete job * local send storage * update sprocs for null checks
This commit is contained in:
27
src/Core/Models/Api/SendFileModel.cs
Normal file
27
src/Core/Models/Api/SendFileModel.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Bit.Core.Models.Data;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class SendFileModel
|
||||
{
|
||||
public SendFileModel() { }
|
||||
|
||||
public SendFileModel(SendFileData data, GlobalSettings globalSettings)
|
||||
{
|
||||
Id = data.Id;
|
||||
Url = $"{globalSettings.Send.BaseUrl}/{data.Id}";
|
||||
FileName = data.FileName;
|
||||
Size = data.SizeString;
|
||||
SizeName = CoreHelpers.ReadableBytesSize(data.Size);
|
||||
}
|
||||
|
||||
public string Id { get; set; }
|
||||
public string Url { get; set; }
|
||||
[EncryptedString]
|
||||
[EncryptedStringLength(1000)]
|
||||
public string FileName { get; set; }
|
||||
public string Size { get; set; }
|
||||
public string SizeName { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user