Changeset 13

Show
Ignore:
Timestamp:
10/14/07 02:05:15
Author:
ed
Message:

can now force download mode (attachement => save as)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • xmlautoindex/trunk/Apache/XmlAutoIndex/Audio.pm

    r6 r13  
    4545{ 
    4646        my $this = shift; 
    47         return qw{ thumb fmxml audioPlaylist meta }; 
     47        return qw{ thumb fmxml audioPlaylist meta download }; 
    4848} 
    4949                 
  • xmlautoindex/trunk/Apache/XmlAutoIndex/Image.pm

    r1 r13  
    3333{ 
    3434        my $this = shift; 
    35         return qw{ thumb size0 size1 size2 size3 meta }; 
     35        return qw{ thumb size0 size1 size2 size3 meta download }; 
    3636} 
    3737 
  • xmlautoindex/trunk/Apache/XmlAutoIndex/OpenDocument.pm

    r1 r13  
    2727{ 
    2828        my $this = shift; 
    29         return qw{ thumb size0 meta}; 
     29        return qw{ thumb size0 meta download }; 
    3030} 
    3131 
  • xmlautoindex/trunk/Apache/XmlAutoIndex/Pdf.pm

    r1 r13  
    2323{ 
    2424        my $this = shift; 
    25         return qw{ thumb }; 
     25        return qw{ thumb download }; 
    2626} 
    2727 
  • xmlautoindex/trunk/Apache/XmlAutoIndex/Video.pm

    r1 r13  
    1818{ 
    1919        my $this = shift; 
    20         return qw{ thumb flv meta }; 
     20        return qw{ thumb flv meta download }; 
    2121} 
    2222 
  • xmlautoindex/trunk/Apache/XmlAutoIndex/core.pm

    r6 r13  
    8484{ 
    8585        my $this = shift; 
    86         return qw{ thumb }; 
     86        return qw{ thumb download }; 
    8787} 
    8888 
     
    191191                { 
    192192                        ( $file, $mime) = $this->getMetaData( ); 
     193                } 
     194                elsif ($format eq 'download') 
     195                { 
     196                        $this->request->headers_out->{'Content-Disposition'} = "attachment; ".$this->file();  
     197                        return Apache2::Const::DECLINED(); 
    193198                } 
    194199                else