1
0
mirror of https://github.com/bitwarden/server synced 2025-12-25 12:43:14 +00:00

return attachments from API

This commit is contained in:
Kyle Spearrin
2017-06-30 23:01:41 -04:00
parent 284078e946
commit 8ea81a74ae
10 changed files with 132 additions and 31 deletions

View File

@@ -0,0 +1,36 @@
using Newtonsoft.Json;
using System;
namespace Bit.Core.Models.Data
{
public class CipherAttachment
{
public Guid Id { get; set; }
public Guid? UserId { get; set; }
public Guid? OrganizationId { get; set; }
public string AttachmentId { get; set; }
public string AttachmentData { get; set; }
public class MetaData
{
private long _size;
[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 FileName { get; set; }
}
}
}