Ejemplo n.º 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>());
        }
Ejemplo n.º 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());
        }