using System; namespace Kreta.Client.FileService.Request { public class FileUploadRequest : IFileUploadRequest { public 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)); } Path = path; FileName = fileName; Content = content; ContentType = contentType; } public string Path { get; } public string FileName { get; } public byte[] Content { get; } public string ContentType { get; } } }