| 1 | package Crop::File::Send; | ||
| 2 | use base qw/ Crop::Object /; | ||
| 3 | |||
| 4 | =begin nd | ||
| 5 | Class: Crop::File::Send | ||
| 6 | Sendfile feature. | ||
| 7 | |||
| 8 | Nginx performs this action by a X-Accel-Redirect HTTP-header. | ||
| 9 | =cut | ||
| 10 | |||
| 11 | use v5.14; | ||
| 12 | use warnings; | ||
| 13 | |||
| 14 | =begin nd | ||
| 15 | Variable: our %Attributes | ||
| 16 | Class attributes: | ||
| 17 | |||
| 18 | disposition - how a browser must process the file received | ||
| 19 | name - "Content-Disposition" HTTP-header will show that name in a browser | ||
| 20 | url - private URL for Nginx inner redirect | ||
| 21 | =cut | ||
| 22 | our %Attributes = ( | ||
| 23 | disposition => {default => 'inline', mode => 'read'}, | ||
| 24 | name => {mode => 'read/write'}, | ||
| 25 | url => {mode => 'read'}, | ||
| 26 | ); | ||
| 27 | |||
| 28 | 1; |