Lazarus
Installation => General => Topic started by: seba22 on December 20, 2009, 10:17:21 pm
-
Hello,
I just install indy-10.2.0.3 and have problem, because i couldn't find TMsMultiPartFormDataSream.
I want upload file using http, but first i have convert file into multipart/form-data what will be understand for PHP/Apache.
I found nice tutorial here:
http://exposureroom.com/members/skumar.aspx/tutorials/post/23
But in beginning got this error
"unit1.pas(38,54) Error: Identifier not found "TMsMultiPartFormDataStream""
http://www.freeimagehosting.net/image.php?a366330f2e.png
Any idea where find this library ?
Regards
-
Hello
In the unit
/indy-10.2.0.3/lazarus/IdMultipartFormData.pas
I found the class definition on line 122:
TIdMultiPartFormDataStream = class;
Please, verify if this unit is on the path.
Please, verify if your fpc.cfg contains the path.
Sorry my bad english.
regards
-
Hello,
Thank you for reply, but i found other idea.
var
Stream : TIdMultipartFormDataStream;
result:string;
begin
Stream := TIdMultipartFormDataStream.Create;
try
Stream.AddFile( 'input_file_name_on_server_php_script', '/local/file.exe', 'content-type_here' );
result:=IdHTTP1.Post( 'http://server/url.php?action=upload', Stream );
finally
Stream.Free;
end;
Look working very well.
I'v got also troubles getting Indy in linux, but finally running.
I had input patch in compiler properties for indy folder.
http://www.freeimagehosting.net/image.php?4e31caedbf.png
regards