Autor Beitrag
noo.bee Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 120



BeitragVerfasst: Sa 19.09.09 11:44 
aber copy soll doch so aussehen:

ausblenden Delphi-Quelltext
1:
Copy(S: string; Index, Count: Integer)					

und Count ist die Länge des gesuchten Teilstrings - hab ich hier raus gelesen www.delphi-treff.de/...verarbeitung/page/2/



mit der variablen 's' is geändert. aber ändert nix daran, dass der upload trotzdem net will :(
noo.bee Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 120



BeitragVerfasst: So 20.09.09 15:26 
kann mir bitte wieder jemand helfen und sich vllt das thema "upload" anschauen ? die datei wird einfach nicht hochgeladen :/
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: So 20.09.09 17:17 
user profile iconnoo.bee hat folgendes geschrieben Zum zitierten Posting springen:
aber copy soll doch so aussehen:

ausblenden Delphi-Quelltext
1:
Copy(S: string; Index, Count: Integer)					

und Count ist die Länge des gesuchten Teilstrings - hab ich hier raus gelesen www.delphi-treff.de/...verarbeitung/page/2/


ja, aber die Länge des zu extrahierenden String kann ja jedesmal unterschiedlich sein oder in Zukunft geändert werden. Bei deinen festen Wert gibts dann irgendwann einen Fehler...



user profile iconnoo.bee hat folgendes geschrieben Zum zitierten Posting springen:
kann mir bitte wieder jemand helfen und sich vllt das thema "upload" anschauen ? die datei wird einfach nicht hochgeladen :/

Ich hab mit MultiPartFormData noch nicht gearbeitet. Hast du schon mal debuggt?

ausblenden Delphi-Quelltext
1:
MultiPartFormDataStream.AddFile('file[]''c:\clock.avi''');					

Heißt das Feld für die Datei wirklich file[]? Glaub ich nicht...
noo.bee Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 120



BeitragVerfasst: So 20.09.09 18:30 
also debuggt hab ich noch nicht. ich bekomm ja keinen fehler oder so gemeldet. die datei wird eben irgendwohin hochgeladen, aber nicht auf den gewünschten account.

und hast recht, das feld für die datei heißt 'upload' und nicht 'file[]'. hab des mal korrigiert. hat aber nix gebracht. die datei wird zwar hochgeladen, aber nicht dahin wo sie hin soll

falls es jemand testen möchte:

user: 123456123456
pass: 123456123456
noo.bee Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 120



BeitragVerfasst: Di 22.09.09 11:54 
hat noch jemand n tip wo der fehler stecken könnte ? ich kann auch gern nochmal den ganzen code posten - der übersicht halber

also ich hab mir mal die fehlerseite rückgeben lassen:
ausblenden Quelltext
1:
2:
3:
4:
5:
<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!<a href='test.php'>Back</a></div></body></html>

was musste ich da lesen:
--> NO FILE UPLOADED

wo steckt dann denn hier beim upload der fehler ?
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:
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;
noo.bee Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 120



BeitragVerfasst: Mi 23.09.09 18:19 
hat keiner irgendwie nen lösungsansatz ? :?: :idea:
noo.bee Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 120



BeitragVerfasst: Do 24.09.09 21:12 
ok, wenn keiner ne lösung weiß, dann werd ich das demnächst auf eis legen... hab den upload nach anleitung gemacht, aber irgendwo klemmts und ich find nicht raus wo...
habs auch mal bei DP gepostet - da scheint auch keiner den fehler zu finden :?:
noo.bee Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 120



BeitragVerfasst: Mo 28.09.09 11:05 
ich hab mal die duck.pas(4kb) und die clock.avi(80kb) angehängt (mit winrar komprimiert auf 17kb). vllt möchte es ja mal jemand testen und findet den fehler Shocked
ich bin mit meinem geringen wissen am ende

edit: bitte nicht über den "code" schimpfen Embarassed er ist nicht gut geschrieben bzw aufgeräumt, aber er ist kommentiert und funktioniert Very Happy
Einloggen, um Attachments anzusehen!
noo.bee Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 120



BeitragVerfasst: Mi 30.09.09 23:49 
hats mal einer getestet und kann n statement abgeben ?
noo.bee Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 120



BeitragVerfasst: Mo 05.10.09 12:43 
ok, also ein nochmalige prüfung ergab, dass ich NICHT angemeldet bleibe und darin liegt auch das prob.
ich nutze den cookiemanager und der ist auch in idhttp eingetragen... aber ich bleibe nicht eingeloggt. muss ich bei dem cookiemanager noch etwas ändern/einstellen ?
noo.bee Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 120



BeitragVerfasst: So 11.10.09 16:11 
ich wollts nochml pushen und vllt irgendwem ne idee rauskitzeln :roll: :roll: