5 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl -w
use HTTP::DAV;
use warnings;
$d = new HTTP::DAV;
$url = "http://mediacenter.gmx.net:80/test/";
$d->credentials( -user=>"username", -pass=>"password",
-url=>$url);
print "Connecting to $url\n";
$d->open( -url=>$url )
or die("Could not open $url: " . $d->message . "\n");
# Das PUT klappt nur bei kleinen Dateien
if ($d->put( -local=>"/tmp/test.txt", -url=>$url )) {
print "Success\n";
print $d->message."\n"; }
else {
print "Failure\n";
print $d->message."\n"; }
$d->DebugLevel(3);
foreach $err( $d->errors ) { print " Error:$err\n"}
1
2
3
4
5
6
7
8
9
10
11
Setting auth details for mediacenter.gmx.net:80, default to username password
Connecting to http://mediacenter.gmx.net:80/test/
new_resource: For http://mediacenter.gmx.net:80/test/, creating new resource
Using user/pass combo: username password. For GMX MediaCenter, http://mediacenter.gmx.net:80/test/
Starting put of /tmp/test.txt
new_resource: For http://mediacenter.gmx.net:80/test/, creating new resource
Using user/pass combo: username password. For GMX MediaCenter, http://mediacenter.gmx.net:80/test/
new_resource: For http://mediacenter.gmx.net:80/test/test.txt, creating new resource
Failure
put /tmp/test.txt failed
Error:1
5 Einträge, 1 Seite |