FG
💻 Software

cURL Upload file and send POST data

Fresh5 days ago
Mar 15, 202623888 views
Confidence Score0%
0%

Problem

I have a web server running some PHP that checks for an image ( ) and it also checks the POST data for . When the PHP checks I cannot just do: I need to instead check for username and password due to specs. How can I upload the image and have the post data? Any help appreciated!

Error Output

curl -F 'imageName=@myimage' \
'http://www.example.com/?upload=1&username=test&password=test'

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: cURL Upload file and send POST data

Low Risk

Ah found out one way to do this through the man pages. Have to use -F 'username=test' -F 'password=test' I can't combine them with &. Weird If anyone knows another way let me know =)

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment