1
0
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:
Kyle Spearrin
2020-11-02 15:55:49 -05:00
committed by GitHub
parent a5db233e51
commit 82dd364e65
39 changed files with 1774 additions and 11 deletions

View 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; }
}
}