コード例 #1
0
        public virtual async Task UploadCertificateAsync(UploadCertificateInput input)
        {
            if (input.File.Length > 50 * 1024 * 1024)
            {
                throw new UserFriendlyException("file length must less than 50 MB");
            }

            var certificate = ObjectMapper.Map <Certificate>(input);
            await _certificateManager.Create(certificate);
        }
コード例 #2
0
        public async Task <JsonResult> Upload(UploadCertificateInput input)
        {
            await _certificateAppService.UploadCertificateAsync(input);

            return(Json(new AjaxResponse()));
        }