Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Cannot upload media file can you help #541

Open
HarryConings opened this issue Dec 21, 2021 · 0 comments
Open

Cannot upload media file can you help #541

HarryConings opened this issue Dec 21, 2021 · 0 comments

Comments

@HarryConings
Copy link

This is a dump of a Post to send the media file . I am looking at your Curl example for hours now and i do not see the difference
could you help me
rgds
Harry
< POST /api/rest/v1/media-files HTTP/1.1
< Host: f-staging.cloud.akeneo.com
< Accept: /
< Content-type: multipart/form-data
< Authorization: Bearer ZWRmMjRlYjlmNmI4ZGY1NzE0ZWU1NzA1NWQyMjQ0ZjViNWVkYmU3NmNlMDZjOGRmZTA2NzRlNDc3ZGEyYTFlZg
< Content-Length: 216
<
< --f73e83c19d5d05ee70ed3f1798ef0475
Content-Disposition: form-data; name="product"

{"identifier":"A005-BRE-1010","attribute":"product_detail_1","scope": null,"locale": null}
--f73e83c19d5d05ee70ed3f1798ef0475--

HTTP/1.1 422 Unprocessable Entity
Cache-Control: no-cache, private
Content-Security-Policy: default-src 'self' *.akeneo.com 'unsafe-inline'; script-src 'self' 'unsafe-eval' 'nonce-33bfa421c73ea4605c403c36a427eef6dbb3ea3f'; img-src 'self' data: marketplace.akeneo.com; frame-src *; font-src 'self' data:; connect-src 'self' *.akeneo.com
Content-Type: application/json
Date: Tue, 21 Dec 2021 12:48:47 GMT
Server: Apache
Vary: Accept
X-Content-Security-Policy: default-src 'self' *.akeneo.com 'unsafe-inline'; script-src 'self' 'unsafe-eval' 'nonce-33bfa421c73ea4605c403c36a427eef6dbb3ea3f'; img-src 'self' data: marketplace.akeneo.com; frame-src *; font-src 'self' data:; connect-src 'self' *.akeneo.com
X-Frame-Options: sameorigin
X-Webkit-Csp: default-src 'self' *.akeneo.com 'unsafe-inline'; script-src 'self' 'unsafe-eval' 'nonce-33bfa421c73ea4605c403c36a427eef6dbb3ea3f'; img-src 'self' data: marketplace.akeneo.com; frame-src *; font-src 'self' data:; connect-src 'self' *.akeneo.com
Transfer-Encoding: chunked

{"code":422,"message":"You should at least give one of the following properties: "product" or "product_model"."}

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

No branches or pull requests

2 participants
@HarryConings and others