also ich hab mir mal die fehlerseite rückgeben lassen:
Code:
<
html><head><title>Error</title><link rel='stylesheet'
href='http://youload.to/design/beta2/youload.css?37' type='text/css' media='screen'
charset='utf-8' /><link rel='stylesheet' href='http://youload.to/design/beta2/global.css?37'
type='text/css' media='screen' charset='utf-8' /></head><body><div class='error_message'>No
file Uploaded!
[
url='test.php']Back[/
url]</div></body></
html>
was musste ich da lesen:
-->
NO FILE UPLOADED
wo steckt dann denn hier beim upload der fehler ?
Delphi-Quellcode:
procedure TForm1.uploadClick(Sender: TObject);
var
MultiPartFormDataStream: TMsMultiPartFormDataStream;
Response: String;
begin
MultiPartFormDataStream := TMsMultiPartFormDataStream.Create; // Objekte instanzieren
try
// Content-Type bestimmen
idhttp1.Request.ContentType := MultiPartFormDataStream.RequestContentType;
// Formular-Felder setzen, die keine Dateien sein sollen
// MultiPartFormDataStream.AddFormField('', '');
// ...
// Datei laden
MultiPartFormDataStream.AddFile('upload', 'c:\clock.avi', '');
// diese Methode muss _vor_ dem Senden augerufen werden
MultiPartFormDataStream.PrepareStreamForDispatch;
MultiPartFormDataStream.Position := 0;
try
// Anfrage abschicken, hier halt z.B. "deine" PHP-Datei hinsetzen
Response := idhttp1.Post(s, MultiPartFormDataStream);
memo1.Lines.Text := Response;
except
// Upload fehlgeschlagen, entsprechend reagieren
end;
finally
MultiPartFormDataStream.Free;
end;
end;