Uploading files with curl
Whenever I try to upload files using curl
, I seem to stumble over the syntax of the command. So, to avoid repeating the struggle, I’m documenting it here for my own future reference.
Here’s the deal: I aim to execute a standard POST
request, bundling a file along with some additional variables, and dispatch it to a remote server. Here’s the breakdown:
Feel free to tack on as many -F
flags as you need. And don’t forget about the -i
option; it instructs curl to display the response headers alongside, a feature I often find handy.
My site is free of ads and trackers. Was this post helpful to you? Why not
Reference:
Disqus is great for comments/feedback but I had no idea it came with these gaudy ads.