Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi Indy File Upload? (https://www.delphipraxis.net/78178-indy-file-upload.html)

Sascha999999999 30. Sep 2006 12:29


Indy File Upload?
 
Hallo,

habe folgendes Problem!!!

wenn ich einen File mit: "addFile" (Quellcode unten)versende, wird dieser von PHP Script:

Delphi-Quellcode:
<? 
print_r($_REQUEST);
print_r($_FILE);
?>
nicht erkannt (nur die REQUEST Daten werden erkannant), aber nicht der File:

HTTP Sniffer:
Delphi-Quellcode:
POST /user/klasse/online/AI601/CMS/upload/cms/upload.php?user=Sascha&hash= HTTP/1.0 
Connection: keep-alive
Content-Type: multipart/form-data; boundary=--------092806231824670 
Content-Length: 558 
Host: sascha-net.homeip.net
Accept: text/html, */* 
Accept-Encoding: deflate, gzip, identity
User-Agent: AIcms

----------092806231824670 
Content-Disposition: form-data; name="user"

Sascha
----------092806231824670 
Content-Disposition: form-data; name="hash"


----------092806231824670 
Content-Disposition: form-data; name="file"; filename="C:\WINDOWS\DESKTOP\WEB-FTP\FILE_UPLOAD\6\temp\31884.cab"
Content-Type: application/x-cab-compressed



MSCF....³.......,...................E.......e.........15²ž`.Head.txt.8Cæêf.e.CKó.     Ð7Ô3T020Pð÷æårI,IµR..ÍÓQ04W.N-.ɘ).ZZ™šX..(¸û†ðr9ç畤æ•è–T...—¤V”èg”äæX+$g$..§–Øf.çëZX˜Zê.òrñr..
----------092806231824670-- 
HTTP/1.1 200 OK
Date: Thu, 28 Sep 2006 21:18:19 GMT
PICS-Label: (PICS-1.0 "http://www.rsac.org/ratingsv01.html" l on "2005.06.04T16:02+0200" exp "2006.06.04T12:00+0200" r (v 0 s 0 n 0 l 0))
X-Powered-By: ASP.NET
MicrosoftOfficeWebServer: 5.0_Pub
Content-type: text/html; charset=iso-8859-1 

Array

    [user] => Sascha
    [hash] =>
)
Der delphi Code:
Delphi-Quellcode:
 
ResponseInfo:=TIdMultiPartFormDataStream.Create;
ResponseInfo.AddFormField('user', ini.ReadString('Benutzerdaten', 'Username', ''));
ResponseInfo.AddFormField('hash', encode64(ini.ReadString('Benutzerdaten', 'PasswdHash', '')));
ResponseInfo.AddFile( 'file', achiv, 'application/x-cab-compressed' );
IdHTTP1.Request.ContentType := 'application/x-www-form-urlencoded';
idHTTP1.POST('http://sascha-net.homeip.net/user/klasse/online/AI601/CMS/upload/cms/upload.php?user='+ini.ReadString('Benutzerdaten', 'Username', '')+'&hash='+code(ini.ReadString('Benutzerdaten', 'PasswdHash', '')), ResponseInfo);
ResponseInfo.Free;
kann mir jemand helfen?

mkinzler 30. Sep 2006 23:37

Re: Indy File Upload?
 
Code:
$_POST['file'];
?

Sascha999999999 9. Okt 2006 00:09

Re: Indy File Upload?
 
danke
$_FILES und nicht $_FILE wars...


Alle Zeitangaben in WEZ +1. Es ist jetzt 03:39 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz