jpbarrette / curlpp

C++ wrapper around libcURL
http://www.curlpp.org
1.68k stars 360 forks source link

How to upload a binary file(examle: a image) by Form? #136

Closed shaozhihua closed 1 year ago

shaozhihua commented 2 years ago

hello sir, I have already seen the examples: "example19.cpp",but I am a little confused,I don't know how to post a image by form ,should I use some fix options? like formParts.push_back(new curlpp::FormParts::Content("filename", "/home/zsh/test.jpeg")); and request.setOpt(new curlpp::options::HttpPost(formParts)); and request.perform();? I wonder a specific code.I am not smart,thanks so much!

zuixiaosanlang commented 1 year ago

@shaozhihua hello, have you solved this ??

shaozhihua commented 1 year ago

@zuixiaosanlang 没,最后放弃使用这个curlpp了,使用的curl和Qt中的QHttpMultiPart,就没用这个了。

zuixiaosanlang commented 1 year ago

@shaozhihua 我也是用curl解决了,那我也放弃这个curlpp了。可能这个库还没完善好

shaozhihua commented 1 year ago

那我关闭这个issue了