I created an application using php slim 4. When I submit a form with a file attached to it, It works perfectly on my local machine but when I hosted it on the server, it also works but only a certain conditions.
If the filename has some certain characters, the application throws an 405 HttpMethodNotAllowed exception.
With the same filename, I tested it on previous applications I hosted using php slim 4 as well but they work well on those servers.
I later tried to use slim 4 methodoverridemiddleware by adding an X-Http-Method-Override with a POST value header to force the request method to POST. It doesn't throw the 405 HttpMethodNotAllowed anymore but the request strips off the body of the file.
Please has anyone ever experienced this before and what do you think might be the solution