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:
36
src/Core/Models/Data/CipherAttachment.cs
Normal file
36
src/Core/Models/Data/CipherAttachment.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user