--------------------------------------------------------------------}
{------------------- Copyright 4T(4team) © 2010 --------------------}
{--------------------------------------------------------------------}
uses
IdMultipartFormData, IdHTTP;
function UploadFile_UNWAP(_filename, _info: string; const _password: string = ''): string;
var
_F: TIdMultiPartFormDataStream;
_Http: TIdHTTP;
_Buff: string;
begin
_Http := TIdHTTP.Create(nil);
_Http.HandleRedirects := True;
_Http.Get('http://upwap.ru/upload/');
_F := TIdMultiPartFormDataStream.Create;
if FileExists(_filename) then
_F.AddFile('file', _filename, 'multipart/form-data')
else begin
Result := 'Файл для загрузки ненайден!';
Exit;
end;
_F.AddFormField('desc', UTF8Encode(_info));
if _password <> '' then
_F.AddFormField('password', UTF8Encode(_password));
_F.AddFormField('send', UTF8Encode('Отправить!'));
_Buff:=UTF8Decode(_Ht
...
Читать дальше »