Class ByProjectKeyProductsByIDImagesPost

All Implemented Interfaces:
ClientRequestCommand<Product>, CreateHttpRequestCommand, HttpRequestCommand<Product>, RequestCommand<Product>

public class ByProjectKeyProductsByIDImagesPost extends TypeBodyApiMethod<ByProjectKeyProductsByIDImagesPost,Product,File>

Upload a JPEG, PNG and GIF file to a ProductVariant. The maximum file size of the image is 10MB. variant or sku is required to update a specific ProductVariant. The image is uploaded to the Master Variant if variant or sku are not included. Produces the ProductImageAdded Message when the Small version of the image has been uploaded to the CDN.



   CompletableFuture<ApiHttpResponse<com.commercetools.api.models.product.Product>> result = apiRoot
            .withProjectKey("{projectKey}")
            .products()
            .withId("{ID}")
            .images()
            .post(file)
            .execute()