mirror of
https://github.com/bitwarden/server.git
synced 2025-04-22 13:35:10 -05:00

* Remove Url from SendFileModel Url is now generated on the fly with limited lifetime. New model houses the download url generated * Create API endpoint for getting Send file download url * Generate limited-life Azure download urls * Lint fix
27 lines
695 B
C#
27 lines
695 B
C#
using Bit.Core.Models.Data;
|
|
using Bit.Core.Utilities;
|
|
using Bit.Core.Settings;
|
|
|
|
namespace Bit.Core.Models.Api
|
|
{
|
|
public class SendFileModel
|
|
{
|
|
public SendFileModel() { }
|
|
|
|
public SendFileModel(SendFileData data, GlobalSettings globalSettings)
|
|
{
|
|
Id = data.Id;
|
|
FileName = data.FileName;
|
|
Size = data.SizeString;
|
|
SizeName = CoreHelpers.ReadableBytesSize(data.Size);
|
|
}
|
|
|
|
public string Id { get; set; }
|
|
[EncryptedString]
|
|
[EncryptedStringLength(1000)]
|
|
public string FileName { get; set; }
|
|
public string Size { get; set; }
|
|
public string SizeName { get; set; }
|
|
}
|
|
}
|