--- loncom/lonnet/perl/lonuploadrep.pm 2004/04/01 17:36:53 1.2 +++ loncom/lonnet/perl/lonuploadrep.pm 2005/03/16 21:35:17 1.6 @@ -35,7 +35,8 @@ sub handler { my $r = shift; if ($r->uri =~m|^/*uploaded/(\w+)/(\w+)/(.+)$|) { my $chome=&Apache::lonnet::homeserver($2,$1); - if ($chome eq $Apache::lonnet::perlvar{'lonHostID'}) { return OK; } + my @ids=&Apache::lonnet::current_machine_ids(); + foreach my $id (@ids) { if ($id eq $chome) { return OK; } } my $filename = $Apache::lonnet::perlvar{'lonDocRoot'}.'/userfiles/'.$1.'/'.$2.'/'.$3; my ($info, $rtncode); if (-f $filename) { @@ -50,7 +51,7 @@ sub handler { } } } - my $response=&Apache::lonnet::getfile($r->uri,'uploadrep'); + my $response=&Apache::lonnet::repcopy_userfile($r->uri); if ($response eq 'ok') { $r->filename($filename); return OK;