Autor Beitrag
Alice
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 120



BeitragVerfasst: So 22.11.09 14:10 
hi,

bisher ist es mir nur mögl. dies mit imagevenue.com zu bewerkstelligen:

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
uses IdMultipartFormData

var
    response: TStringlist;
    data: TIdMultiPartFormDataStream;
    pic: TMemoryStream;
begin

 IdHTTP1.Request.UserAgent := 'Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)';

 data := TIdMultiPartFormDataStream.create;
 pic  :=  TMemoryStream.create;
 response :=  TStringlist.Create;

 pic.LoadFromFile('yourfilename_and_path.jpg');

 IdHTTP1.Request.ContentType:='image/jpeg';

 data.AddObject('userfile[]','image/jpeg',pic,'img.jpg');
 data.AddFormField('filename','img.jpg');
 data.AddFormField('imgcontent','safe');
 data.AddFormField('interlinkimage','interlinkno');
 data.AddFormField('action','1');

 response.Add (IdHTTP1.Post('http://imagevenue.com/upload.php',data));

 Memo1.lines.Assign(response);
 //Memo1.Lines.SaveToFile('c:\result.html'); //save content, it's hmtl, contains links to images.

 data.free;
 pic.free;
 response.Free;


das ganze wäre mir mit Imageshack lieber?, ist mir jedoch noch nicht gelungen.
gefunden habe ich das hier:

www.planetsourcecode...d=72411&lngWId=1
(image upload zu Imageshack, in VB) was ich jedoch nicht übersetzen kann...

jemand eine idee?

cu
SvenK
Hält's aus hier
Beiträge: 4



BeitragVerfasst: Mi 02.12.09 17:04 
Denke, dass Dir die handliche Lösung mit Source (anpassungsfähig) am liebsten ist.
Ist eine DLL denkbar, wäre das hier www.vclcomponents.co...ack_Upload-info.html ein Weg zur Umsetzung. DLL mit AnwendungsSource ...

Jedoch ungetestet, denn eine kleine Änderung im Interface und schon geht bekanntlich gar nichts mehr ...
Alice Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 120



BeitragVerfasst: Di 15.12.09 00:39 
user profile iconSvenK hat folgendes geschrieben Zum zitierten Posting springen:
Denke, dass Dir die handliche Lösung mit Source (anpassungsfähig) am liebsten ist.
Ist eine DLL denkbar, wäre das hier www.vclcomponents.co...ack_Upload-info.html ein Weg zur Umsetzung. DLL mit AnwendungsSource ...

Jedoch ungetestet, denn eine kleine Änderung im Interface und schon geht bekanntlich gar nichts mehr ...


danke, erstmal. leider funkt diese dll nicht!?!

cu