Пример #1
0
        public async Task <IActionResult> PostPostImage(int postId, [FromForm] ImagePostRequest imageRequest)
        {
            imageRequest.PostId = postId;
            var image = await _imageService.AddPostImage(imageRequest);

            return(CreatedAtRoute("GetPostImage", new { postId = postId, id = image.ImageId }, image));
        }