Home » U++ Library support » U++ MT-multithreading and servers » fileupload and post data
| Re: fileupload and post data [message #59972 is a reply to message #59967] |
Thu, 29 June 2023 10:34  |
 |
forlano
Messages: 1217 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
After several tests this seems to work
void fileupload::upload()
{
String url = "https://validurl/transfer.php";
httprequest r(url);
String fn = "C:/upp/out/MyApps/MSBT17.Gui/test.pdf";
String s = LoadFile(fn);
r.POST();
r.Part("file", s , "multipart/form-data", fn);
r.Part("username", FTPUSER , "multipart/form-data");
r.Part("password", FTPPASS , "multipart/form-data");
r.Execute();
}
Luigi
[Updated on: Thu, 29 June 2023 10:35] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Tue Dec 02 03:55:38 CET 2025
Total time taken to generate the page: 0.06282 seconds
|