0
nine
4y

Working on a Django API where I have to send a request to a PHP file to upload a XML file. Here is what I wrote:

url = 'url.to.php.file'
files = {
name: ('filename', xml_file.xml)
}
response = requests.post(url, files=files)

I am getting Internal server error. Do not know what I did wrong. Am stuck on this for like 3 days and have tried EVERY alternative POSSIBLE. HELP ME

*cries in corner*

Comments
  • 1
    Check the webserver error log and the php error log. Setup xdebug and debug.
  • 2
    Solved this, error was in the PHP file *cries more in the corner*
Add Comment