#include "Base64.h"
Action()
{
char temp[1024]="\0";
web_set_max_html_param_len("999999");
web_reg_save_param("newFileName", "LB=newFileName\":\"", "RB=\",\"d", "Search=Body", LAST);
web_reg_save_param("fileSize", "LB=fileSize\":", "RB=,\"r", "Search=Body", LAST);
web_reg_save_param("dirID", "LB=dirId\":\"" , "RB=\",\"f", "Search=Body", LAST);
//lr_rendezvous("upload");
web_submit_data("webUpload",
"Action=http://localhost:8080/esn_net/serv/webUpload",
"Method=POST",
"EncType=multipart/form-data",
"RecContentType=application/octet-stream",
"Referer=",
"Mode=HTML",
ITEMDATA,
"Name=fileupload","Value=c:\\log.txt","File=yes",ENDITEM,
LAST);
strcat(temp,lr_eval_string("{newFileName}"));
strcat(temp,"|");
strcat(temp,lr_eval_string("{newFileName}"));
strcat(temp,"|");
strcat(temp,lr_eval_string("{fileSize}"));
strcat(temp,"|");
strcat(temp,lr_eval_string("{dirID}"));
strcat(temp,"|&");
lr_save_string(temp,"saveto");
// lr_message("%s",lr_eval_string("{saveto}"));*/
web_submit_data("uploadAction!saveFile",
"Action=http://localhost:8080/esn_net/uploadAction!saveFile",
"Method=POST",
"EncType=multipart/form-data",
"RecContentType=text/html",
"Referer=",
"Mode=HTML",
ITEMDATA,
"Name=currentUserId","Value=101ba6ffe6bf48da968ced140ebc980b",ENDITEM,
"Name=diskId","Value=2eaef92292f049d1af0247981c78673b",ENDITEM,
"Name=dirId","Value=2eaef92292f049d1af0247981c78673b",ENDITEM,
"Name=uploadsFileNames","Value={saveto}",ENDITEM,
LAST);
web_url("LoginAction!logout.action",
"URL=http://localhost:8080/esn_net/login/LoginAction!logout.action?version=2",
"Resource=0",
"RecContentType=text/html",
"Referer=http://localhost:8080/esn_net/v2/index.html",
"Snapshot=t86.inf",
"Mode=HTTP",
LAST);
return 0;
}