我在MS-DOS Windows中执行以下操作。
在“inspect->复制为cURL(cmd)”中,用于监控文件上传的Chrome返回给我:
curl "http://up11.usersfiles.com/cgi-bin/upload.cgi?upload_id=303797686054&js_on=1&utype=anon&upload_type=file" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" -H "Referer: http://usersfiles.com/" -H "Origin: http://usersfiles.com" -H "Upgrade-Insecure-Requests: 1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36" -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryKWLS1B0x6JrGdgBM" --data-binary "------WebKitFormBoundaryKWLS1B0x6JrGdgBM"^
"Content-Disposition: form-data; name=""upload_type"""^
"file"^
"------WebKitFormBoundaryKWLS1B0x6JrGdgBM"^
"Content-Disposition: form-data; name=""sess_id"""^
"------WebKitFormBoundaryKWLS1B0x6JrGdgBM"^
"Content-Disposition: form-data; name=""srv_tmp_url"""^
"http://up11.usersfiles.com/tmp"^
"------WebKitFormBoundaryKWLS1B0x6JrGdgBM"^
"Content-Disposition: form-data; name=""file_0""; filename=""prueba.mp4"""^
"Content-Type: video/mp4"^
"------WebKitFormBoundaryKWLS1B0x6JrGdgBM"^
"Content-Disposition: form-data; name=""undefined_descr"""^
"------WebKitFormBoundaryKWLS1B0x6JrGdgBM"^
"Content-Disposition: form-data; name=""link_rcpt"""^
"------WebKitFormBoundaryKWLS1B0x6JrGdgBM"^
"Content-Disposition: form-data; name=""link_pass"""^
"------WebKitFormBoundaryKWLS1B0x6JrGdgBM"^
"Content-Disposition: form-data; name=""to_folder"""^
"------WebKitFormBoundaryKWLS1B0x6JrGdgBM"^
"Content-Disposition: form-data; name=""file_1""; filename="""""^
"Content-Type: application/octet-stream"^
"------WebKitFormBoundaryKWLS1B0x6JrGdgBM"^
"Content-Disposition: form-data; name=""submit_btn"""^
" Start Upload "^
"------WebKitFormBoundaryKWLS1B0x6JrGdgBM--"^
"" --compressed
这在MS-DOS的Windows中不起作用,我怎样才能让它对我有用?我不知道如何使用--data-binary。你能帮帮我吗?