|
lr_output_message ("################### %s ##############################",lr_eval_string ("{username}"));
web_set_max_html_param_len("20000000000");
web_reg_save_param ("count",
"LB=",
"RB=",
"SEARCH=BODY",
LAST);
web_submit_data ("download.file",
"Action=http:?fileUuid=4f154207ab017bffd4c65370",
"Method=POST",
"EncType=multipart/form-data",
"RecContentType=text/html",
"Referer=",
"Mode=HTML",
ITEMDATA,
LAST);
// web_submit_data("download.file",
// "Action=http://1.1.1.10/omm_spc/caseFile/download.do?fileUuid={fileid}",
// "Method=POST",
// "EncType=multipart/form-data",
// "RecContentType=text/html",
// "Referer=",
// "Mode=HTML",
// ITEMDATA,
// LAST);
strcpy(filepath,
"D:\\test\\");
strcat(filepath,
fullpath);
strcat(filepath,
".doc");
flen = web_get_int_property (HTTP_INFO_DOWNLOAD_SIZE);
if (flen >0 ) {
if((file_stream = fopen(filepath, "wb")) == NULL )
// if((file_stream = fopen(fullpath, "wb")) == NULL)
{
lr_output_message ("Open file fail !");
return -1;
}
fwrite(lr_eval_string("{count}"),flen,1 ,file_stream);
fclose(file_stream);
}
return 0;
} |
|