mirror of
https://github.com/bitwarden/server
synced 2025-12-25 12:43:14 +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:
37
src/Core/Models/Data/SendFileData.cs
Normal file
37
src/Core/Models/Data/SendFileData.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user