Changeset 24597 for main/trunk/greenstone2/perllib
- Timestamp:
- 2011-09-14T10:38:59+12:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/cgiactions/imageaction.pm
r19499 r24597 98 98 } 99 99 100 my $collect_directory = &util::filename_cat($gsdlhome, "collect"); 100 my $site = $self->{'site'}; 101 my $collect_directory = $gsdl_cgi->get_collection_dir($site); 102 #my $collect_directory = &util::filename_cat($gsdlhome, "collect"); 101 103 # $gsdl_cgi->checked_chdir($collect_directory); 102 104 … … 172 174 # now output it with suitable mime header 173 175 print STDOUT "Content-type:$mime_type\n\n"; 174 system("cat \"$dst_full_assoc_filename\""); 176 177 if (open(IMGIN,"<$dst_full_assoc_filename")) { 178 binmode IMGIN; 179 binmode STDOUT; 180 181 my $data; 182 while (read(IMGIN,$data,1024) != 0) { 183 print STDOUT $data; 184 } 185 186 close(IMGIN); 187 188 #system("cat \"$dst_full_assoc_filename\""); 189 } 190 else { 191 $gsdl_cgi->generate_error("Unable to open $dst_full_assoc_filename for output"); 192 } 175 193 } 176 194 else {
Note:
See TracChangeset
for help on using the changeset viewer.