Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

How to upload image in the create API ? #34

Open
numerogeek opened this issue Jul 6, 2020 · 0 comments
Open

How to upload image in the create API ? #34

numerogeek opened this issue Jul 6, 2020 · 0 comments

Comments

@numerogeek
Copy link

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 ?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant