private void CheckFileInfoModel(UploadFileInfoViewModel fileInfo) { // TODO: reafactor for null UploadFileInfoViewModel if (fileInfo == null || !this.ModelState.IsValid) { throw new ArgumentException(ExceptionForFileInfo); } }
private void CreateContent(HttpPostedFileBase file, UploadFileInfoViewModel fileInfo) { this.CheckFileModel(file); this.CheckFileInfoModel(fileInfo); // TODO: refactor -> coverImageUrl string coverImageUrl = "https://dl.dropboxusercontent.com/1/view/jm0poduvuxj8ekh/Apps/EntertainmentSystem/88518440-dd5d-46e3-9f4a-7b2e8c3d8cec.jpg"; var contentId = this.uploadingGeneratorService.Create( file.InputStream, file.ContentType, this.HttpContext.User.Identity.GetUserId(), fileInfo.Title, fileInfo.Description, coverImageUrl, fileInfo.CategoryId, fileInfo.CollectionId); }