I'm running the following curl command in CGI script in python using os.system call as below:
os.system('curl -u username:password -X PUT example.com/data/data1.txt -T /diskless/desktop/file.txt\r\n')
Getting the below error when I run the CGI script:
'!rl: Can't open '/diskless/desktop/file.txt') curl: try 'curl --help' or 'curl --manual' for more information.
Any suggestions please?
curlor can you not use other python libraries to handlehttprequests for you (likepython requestsfor example)Can't open '/diskless/desktop/file.txt'. do you have permissions on the file you are trying to upload?