I pretty much did the same last. thanks tho.
procedure TForm1.Button1Click(Sender: TObject); var MPData: TIdMultiPartFormDataStream; sResponse: string; begin MPData := TIdMultiPartFormDataStream.Create; MPData.AddFile('fileupload','c:\image.png','image/png'); MPData.AddFormField('tags','testfile,flyasia'); MPData.AddFormField('public','no'); MPData.AddFormField('key','API_KEY_HERE'); sResponse := IdHTTP1.Post('http://www.imageshack.us/upload_api.php', MPData); MPData.Free; Memo1.Text := sResponse; end;
Kevin source share