//=================отправка фотографии
if (Form4->Edit11->Text!="") {
temp=Form4->Edit11->Text;
while (temp.Pos("\\")!=0)
{
temp = temp.SubString(temp.Pos("\\")+1,temp.Length()-temp.Pos("\\")+1);
}
PictureStream->LoadFromFile(Form4->Edit11->Text);
DataIn->Seek(0,soFromBeginning);
Form1->IdHTTP1->Request->ContentType="multipart/form-data; boundary=---------------------------267462439010424";
DataIn->WriteString("-----------------------------267462439010424\r\n");
DataIn->WriteString("Content-Disposition: form-data; name=\"image\"; filename=\""+temp+"\"\r\n");
DataIn->WriteString("Content-Type: image/jpeg\r\n\r\n");
DataIn->CopyFrom(PictureStream,PictureStream->Size);
DataIn->WriteString("\r\n-----------------------------267462439010424\r\n");
DataIn->WriteString("Content-Disposition: form-data; name=\"imgnum\"\r\n\r\n");
DataIn->WriteString("0\r\n");
DataIn->WriteString("-----------------------------267462439010424\r\n");
DataIn->WriteString("Content-Disposition: form-data; name=\"obj_id\"\r\n\r\n");
DataIn->WriteString("0\r\n");
DataIn->WriteString("-----------------------------267462439010424--\r\n\r\n");
//DataIn->WriteString(post4.c_str());
DataOut->Seek(0,soFromBeginning);
Form1->IdHTTP1->Post(url_pic,DataIn,DataOut);
re_str = "imgdiv.tag = '(.*?)';";
if (regcomp(&re,re_str,0));
//ошибка компиляции регулярного выражения
if (regexec(&re, DataOut->DataString.t_str(), RE_MATCHES_MAX, re_matches, 0));
//ошибка в поиске
else
{
md5s=DataOut->DataString.SubString(re_matches[1].rm_so+1,re_matches[1].rm_eo-re_matches[1].rm_so);
}
}