axios equivalent to curl --upload-file
问题 I'm trying to upload a gif to Gfycat using their public API. This is done using cURL on the command line with: curl https://filedrop.gfycat.com --upload-file /tmp/name I attempted to convert this to Node.js using axios: axios.post("https://filedrop.gfycat.com", { data: fs.createReadStream("/tmp/name") }).then(console.log).catch(console.log); but an error with the message <?xml version="1.0" encoding="UTF-8"?>\n<Error><Code>PreconditionFailed</Code><Message>At least one of the pre-conditions