2.在使用curl_formadd的地方按照如下方式添加。 const char* name = "aa换行a中国88989.mp4"; //上传服务器后命名 const char* file = "./bbm3啊aa.mp4"; //本地文件路径+文件名 std::string strName = ANSItoUTF8(name); curl_formadd(&pFormPost, &pLastElem, CURLFORM_COPYNAME, "upload", ...
curl_formadd(first, last, CURLFORM_PTRNAME, mName.c_str(), CURLFORM_PTRCONTENTS, mContent.c_str(), CURLFORM_FILENAME, mFilename.c_str(), CURLFORM_CONTENTTYPE, mContentType.c_str(), CURLFORM_END ); But adding CURLFORM_FILENAME was also not succesful. ...
I did this Create a file of the form "foo.jpg (note the leading quote) Submit as a form using curl -i -F encoded_image=@\"foo.jpg https://www.google.com/searchbyimage/upload I expected the following Within the multipart/form-data that is...