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

asset-media-files creation fails #313

Open
chandrantwins opened this issue Dec 12, 2019 · 1 comment
Open

asset-media-files creation fails #313

chandrantwins opened this issue Dec 12, 2019 · 1 comment

Comments

@chandrantwins
Copy link

{{url}}/api/rest/v1/asset-media-files

image

i am always getting this error message
{
"code": 422,
"message": "Property "file" is required."
}

but i have already choosed file type and file too.
Please help me to resolve this issue

@TomMcCulloch
Copy link

Kia ora chandrantwins, I don't know if you are still having issues with this but I just encountered the same problem but have managed to resolve it so I thought at the very least I will post for future users. I was trying to use the reference entity media files endpoint.

For me, the issue was that in Postman Content-Type was being set in two locations - in the Headers and in the Body (as the file is being added under the 'form-data' section).

image

image

Postman says that Content-Type header in the Headers section will be overridden but it seems to only fail when this is set as well:

image

image

This might actually be more of a Postman issue as it feels like what the pop-up dialogue is saying is not actually being followed.

Hope this helps :)

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