Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Varios (https://www.clubdelphi.com/foros/forumdisplay.php?f=11)
-   -   Problema con subir archivos (https://www.clubdelphi.com/foros/showthread.php?t=83719)

JuanOrtega 19-07-2013 16:29:46

Problema con subir archivos
 
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


//Response := TMemoryStream.Create;
//rta:=IdHTTP1.Post('https://post.imageshack.us/upload_api.php', 'test.jpg', Response);


  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 ?

Casimiro Noteví 19-07-2013 17:40:10

¿No hay ninguna documentación en su web?

JuanOrtega 19-07-2013 18:50:16

na , el error ya esta arreglado le quite la s a https y ando sin ningun problema , igual gracias.


La franja horaria es GMT +2. Ahora son las 07:30:48.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi