Hola estoy tratando de subir un archivo con el api de imageshack.
El codigo que tengo es este :
Código Delphi
[-]procedure TForm1.Button1Click(Sender: TObject);
var
par: TIdMultiPartFormDataStream;
rta: string;
Response: TStream;
begin
par := TIdMultiPartFormDataStream.Create;
par.AddFormField('key', 'mikey');
par.AddFormField('fileupload','test.jpg');
par.AddFormField('format', 'json');
rta := IdHTTP1.Post('https://post.imageshack.us/upload_api.php', par);
Memo1.Lines.Add(rta);
end;
Y no me sube nada aparte de mostrar este error :
Exception class EIdIOHandlerPropInvalid with message 'IOHandler value is not valid
Tambien intente agregando esto :
Código Delphi
[-]
par.AddFile('fileupload', 'test.jpg','application/octet-stream');
Pero es lo mismo.
¿ Alguien me podria ayudar ?