mirror of
https://github.com/bitwarden/server.git
synced 2026-02-03 07:33:11 +08:00
38 lines
885 B
C#
38 lines
885 B
C#
|
|
using System;
|
|||
|
|
using Bit.Core.Models.Api;
|
|||
|
|
using Newtonsoft.Json;
|
|||
|
|
|
|||
|
|
namespace Bit.Core.Models.Data
|
|||
|
|
{
|
|||
|
|
public class SendFileData : SendData
|
|||
|
|
{
|
|||
|
|
private long _size;
|
|||
|
|
|
|||
|
|
public SendFileData() { }
|
|||
|
|
|
|||
|
|
public SendFileData(SendRequestModel send, string fileName)
|
|||
|
|
: base(send)
|
|||
|
|
{
|
|||
|
|
FileName = fileName;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
[JsonIgnore]
|
|||
|
|
public long Size
|
|||
|
|
{
|
|||
|
|
get { return _size; }
|
|||
|
|
set { _size = value; }
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// We serialize Size as a string since JSON (or Javascript) doesn't support full precision for long numbers
|
|||
|
|
[JsonProperty("Size")]
|
|||
|
|
public string SizeString
|
|||
|
|
{
|
|||
|
|
get { return _size.ToString(); }
|
|||
|
|
set { _size = Convert.ToInt64(value); }
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public string Id { get; set; }
|
|||
|
|
public string FileName { get; set; }
|
|||
|
|
}
|
|||
|
|
}
|