I have a simple Laravel app with endpoints for file upload.
When I call POST
endpoint to create (and upload) brand new file, everything works on both local (docker) and AWS.
I do HTTP POST
to api/file
with payload:
I pick file from my desktop, provide name, type and model's UUID (polymorphic relationship).
However… when I want to overwrite this file I have a HTTP PUT
endpoint: api/file/<UUID OF PREVIOUSLY UPLOADED FILE>
with payload:
The issue is bizarre because I don't get any PHP issues. Laravel simply cannot pass the validation because it somehow completely DOES NOT SEE the payload on AWS. On local (docker) this works with no issues whatsoever.
I'm pretty sure this is AWS related but I'm running out of clues what is the culprit. Below is the validation message bag but I swear I pass type
and model_uuid
(screenshot number 2).
{
"error": [
"Model type is required.",
"Model UUID is required."
]
}