예제 #1
0
        public async Task <IEnumerable <string> > ValidateFileAsync(IFileInfo fileInfo)
        {
            var response = await DoRequestAsync <FileUploadValidationResponseModel>(ApiFileUploadHandler <THandler> .CreateRequest("file/validate", fileInfo));

            return(response?.ErrorMessages ?? Enumerable.Empty <string>());
        }
예제 #2
0
        public async Task <object> SaveFileAsync(IFileInfo fileInfo, Stream stream)
        {
            var response = await DoRequestAsync <FileUploadResponseModel>(ApiFileUploadHandler <THandler> .CreateRequest("file", fileInfo, stream));

            return(response?.Result ?? new object());
        }