POST,GET | /api/FileAttachment/GetFile |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using ClubManager.Interfaces.Models.FileAttachment;
namespace ClubManager.Interfaces.Models.FileAttachment
{
public partial class FileAttachmentData
{
public FileAttachmentData()
{
FileData = new byte[]{};
Thumbnail = new byte[]{};
}
public virtual int FileAttachmentId { get; set; }
public virtual int BranchId { get; set; }
public virtual int UploadedByUserId { get; set; }
public virtual byte[] FileData { get; set; }
public virtual string InstanceType { get; set; }
public virtual int InstanceId { get; set; }
public virtual string Filename { get; set; }
public virtual int FileSize { get; set; }
public virtual string MimeType { get; set; }
public virtual byte[] Thumbnail { get; set; }
}
}
C# FileAttachmentService.GetFileRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/FileAttachment/GetFile HTTP/1.1
Host: api.clubmanagercentral.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"FileAttachmentId":0}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"FileAttachmentId":0,"BranchId":0,"UploadedByUserId":0,"FileData":"AA==","InstanceType":"String","InstanceId":0,"Filename":"String","FileSize":0,"MimeType":"String","Thumbnail":"AA=="}