curl has -T, --upload-file option to "transfer the specified local file to the remote URL".
curl -v "http://some/data/consumer" -XPOST -T "some/file/name"
How can I get the equivalent data of a file using curl -T
, from <input type="file" />
using JavaScript?