36 lines
985 B
C#
36 lines
985 B
C#
using System;
|
|
|
|
namespace Kreta.Client.FileService.Request
|
|
{
|
|
public class DKT_FileUploadRequest : IFileUploadRequest
|
|
{
|
|
public DKT_FileUploadRequest(string fileName, byte[] content, string contentType, string path)
|
|
{
|
|
if (string.IsNullOrWhiteSpace(fileName))
|
|
{
|
|
throw new ArgumentNullException(nameof(fileName));
|
|
}
|
|
|
|
if (content?.Length == 0)
|
|
{
|
|
throw new ArgumentNullException(nameof(content));
|
|
}
|
|
|
|
if (string.IsNullOrWhiteSpace(contentType))
|
|
{
|
|
throw new ArgumentNullException(nameof(contentType));
|
|
}
|
|
|
|
FileName = fileName;
|
|
Path = path;
|
|
Content = content;
|
|
ContentType = contentType;
|
|
}
|
|
|
|
public string FileName { get; }
|
|
public string Path { get; }
|
|
public byte[] Content { get; }
|
|
|
|
public string ContentType { get; }
|
|
}
|
|
}
|