Here is the CURLINFO_HEADER_OUT from PHP Curl Call-
"GET \/api\/v2\/file\/upload?token=c3344fd7d60f3e6587308f55e3aed0f7&name=Client3.php&hash=ccb1fac3110514a2039b5da707717f81&size=15390 HTTP\/1.1\r\nHost: rapidgator.net\r\nAccept: *\/*\r\n\r\n" Now how can I change this into Bash Curl to upload a file?
My attempt is-
FileUploadResponse=$(curl -H "CURLOPT_HEADER:false" -H "CURLOPT_RETURNTRANSFER:true" "$BaseURL"'file/upload?token='"$Token"'&hash='"$Hash"'&size='"$FileSize"'&name='"$FileName"|grep -E 'response') echo $FileUploadResponse
CURLOPT_HEADERandCURLOPT_RETURNTRANSFERare not HTTP headers."${baseURL}file/upload?token=$Token&hash=$Hash"