Autor Beitrag
Ulrich Berger
Hält's aus hier
Beiträge: 3



BeitragVerfasst: Mo 14.07.08 13:31 
Hallo allerseits,

folgendes Problem: per Delphi-Programm sollen Dateien (Bilddateien, PDFs usw.) auf einen Server hochgeladen werden. Alles was ich bisher dazu gefunden habe scheint davon auszugehen daß der Upload von einem HTML-Formular aus mit Hilfe eines PHP-Scripts geschieht. Aber es muß doch auch ohne gehen???

Folgende Voraussetzungen: auf dem Server läuft ein Apache Tomcat 5, zur Entwicklung der Anwendung stehen Delphi 5 mit Indy 8 oder Delphi 2007 mit installierten Indy-Komponenten in der Version 9 zur Verfügung.

Der Upload soll/muß per HTTP erfolgen, die Alternative das Hochladen über FTP zu realisieren steht leider nicht zur Verfügung.

Hat jemand dazu vielleicht mal ein Beispiel oder einen weiterführenden Link? Ich wäre demjenigen sehr verbunden...

Danke schon mal und Gruß Uli
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 14.07.08 13:48 
Moin und :welcome: im Forum!

user profile iconUlrich Berger hat folgendes geschrieben:
Der Upload soll/muß per HTTP erfolgen, die Alternative das Hochladen über FTP zu realisieren steht leider nicht zur Verfügung.
AFAIK gibt es im HTTP-Protokoll keine Möglichkeit, Daten auf dem Server abzulegen, sprich: HTTP ist (erstmal) eine Einbahnstraße. :nixweiss:

Deshalb brauchst du z.B. ein PHP-Script, um diese Beschränkung zu "umgehen". :idea: Alternativ bliebe nur noch ein anderes Protokoll, z.B. FTP, um auf das Dateisystem des Server zuzugreifen, aber nur über HTTP geht das nicht.

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 14.07.08 21:21 
Doch das geht: Mit dem HTTP PUT Befehl. Ist aber nur für WebDAV interessant.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 14.07.08 21:27 
Moin!

user profile iconmatze hat folgendes geschrieben:
Doch das geht: Mit dem HTTP PUT Befehl.
Spannend, kannte ich noch gar nicht. ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Timosch
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1314

Debian Squeeze, Win 7 Prof.
D7 Pers
BeitragVerfasst: Mo 14.07.08 21:58 
user profile iconUlrich Berger hat folgendes geschrieben:
Hallo allerseits,

folgendes Problem: per Delphi-Programm sollen Dateien (Bilddateien, PDFs usw.) auf einen Server hochgeladen werden. Alles was ich bisher dazu gefunden habe scheint davon auszugehen daß der Upload von einem HTML-Formular aus mit Hilfe eines PHP-Scripts geschieht. Aber es muß doch auch ohne gehen???

Ohne HTML-Form oder ohne PHP-Script? Das erstere geht, das zweitere nicht (bzw. nur mit WebDAV).



user profile iconNarses hat folgendes geschrieben:
Moin!

user profile iconmatze hat folgendes geschrieben:
Doch das geht: Mit dem HTTP PUT Befehl.
Spannend, kannte ich noch gar nicht. ;)

cu
Narses

AFAIK gibt es sogar DELETE.

PS: Ist das hier sowas wie ein Moderatoren-Thread? :mrgreen:

_________________
If liberty means anything at all, it means the right to tell people what they do not want to hear. - George Orwell
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: Mo 14.07.08 22:22 
user profile iconTimosch hat folgendes geschrieben:
PS: Ist das hier sowas wie ein Moderatoren-Thread? :mrgreen:

Nein, da fehlen die branch-Links zu :mrgreen:

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)