Esempio n. 1
0
        public async Task <ActionResult <RequestStatusDto> > AddAuctionImage(
            [FromForm] AddAuctionImageCommandDto commandDto)
        {
            var cmd = new AddAuctionImageCommand(new FileStreamAccessor(commandDto.Img), commandDto.ImgNum,
                                                 FileExtensionUtil.GetFileExtensionOrThrow400(commandDto.Img.FileName));
            var response = await _httpQueuedCommandMediator.Send(cmd);

            return(this.StatusResponse(response));
        }
Esempio n. 2
0
        public async Task <ActionResult <RequestStatusDto> > UserReplaceAuctionImage([FromForm] UserReplaceAuctionImageCommandDto commandDto)
        {
            var cmd      = new UserReplaceAuctionImageCommand(Guid.Parse(commandDto.AuctionId), new FileStreamAccessor(commandDto.Img), commandDto.ImgNum, FileExtensionUtil.GetFileExtensionOrThrow400(commandDto.Img.FileName));
            var response = await _mediator.Send(cmd);

            return(this.StatusResponse(response));
        }