Re: [greenstone-users] Re: names of downloaded Word documents

From Katherine Don
DateFri, 30 Jul 2004 09:13:03 +1200
Subject Re: [greenstone-users] Re: names of downloaded Word documents
In-Reply-To (p06110406bd2de38215ac-172-16-1-51)
Hi Rich

Try editing gsdl/perllib/plugins/ConvertToPlug.pm.

At the end of the file, in sub process_type, there is a bit like

my $filename = &util::filename_cat($base_dir, $file);
$doc_obj->associate_file($filename, "doc.$doc_ext", undef, $cursection);
my $doclink = "<a href="/gsdl/collect/gsarch/index/assoc/[archivedir]/doc.
$doc_ext">";

change this to

my $filename = &util::filename_cat($base_dir, $file);
my ($finalname) = $filename =~ /[/\]([^/\]+)$/;
$doc_obj->associate_file($filename, $finalname, undef, $cursection);
my $doclink = "<a
href="/gsdl/collect/gsarch/index/assoc/[archivedir]/$finalname">";

This should now save the word files under the original name.

Regards,
Katherine Don
Rich Robinson wrote:
> Hello,
>
> I have noticed that when downloading Microsoft Word documents from our
> library, that they all get downloaded as "doc.doc" even though they have
> individual names (e.g. glasser01.doc). Is there a way to have them
> download with their proper filenames? (Using version 2.51 on a UNIX server)
>
> Rich R.
>
> _______________________________________________
> greenstone-users mailing list
> greenstone-users&#64;list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>