Skip to content

How to upload image in the create API ? #34

@numerogeek

Description

@numerogeek

Hi !

I am tryin to use the $apiClient->product()->create() with an array of data, including images.
It appears that here https://github.com/FriendsOfApi/sylius-api-client/blob/master/src/RequestBuilder.php#L60 you check if the $body is an array.

It's always an array, because of here https://github.com/FriendsOfApi/sylius-api-client/blob/master/src/Api/HttpApi.php#L76 you create a json from params.

So we can't send files I guess ?
We should be able to chose not to convert params in json, what do you think ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions