Esempio n. 1
0
        public async Task <ActionResult> FulfillableItem(string id, string size)
        {
            if (!int.TryParse(size, out var sizeValue))
            {
                sizeValue = Constants.ThumbnailSize;
            }

            id = WebUtility.UrlDecode(id);

            var orderItemId = ParseOrderItemId.FromFulfillableItemReference(id);
            var mOrderItem  = await OrderMicroService.GetOrderItemAsync(orderItemId);

            var projectSnapshotId = (int)ParseProjectSnapshotId.FromOrderableReference(mOrderItem.OrderableReference);
            var image             = await ProjectUserService.GetProjectSnapshotThumbnailAsync(GetUserId(), projectSnapshotId, sizeValue);

            return(new FileContentResult(image, "image/jpg"));
        }