Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2016
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. using namespace cgicc;
  2. FormFile file;
  3. std::string filename;
  4.  
  5. const std::vector<FormFile> &formFiles= cgi.getFiles();
  6. for (std::vector<FormFile>::const_iterator i = formFiles.begin(); i != formFiles.end(); ++i)
  7. {
  8. //process each (*i)
  9. file = *i;
  10. filename = "C:/TestUpload/" + file.getFilename();
  11. std::ofstream ofile( filename, std::ios::binary );
  12. file.writeToStream(ofile);
  13. std::cout << "Whatever"; // what to do here to ACK "success":true ??
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement