When an bitstream is downloaded, the original bitstream's name (dc.title metadata) is used to set the filename.
This new feature lets set, in four different ways, how the filename is generated, by defining the following configuration options:
- TITLE: set the filename with the bitstream original name (Bitstream.getName()).
- DESCRIPTION: set the filename with the bitstream description (Bitstream.getDescription())
- PARAMETER: set the filename with the parameter of the url. P.e.: in <dspace.url>/handle/<prefix>/<sufix>/<filename_in_url>?<sequence>..., the filename value is <filename_in_url>.
- HANDLE: set the filename using the pattern <handlePrefix><handleSufix><bitstream_sequence>. P.e.: 123456789_325_2.
If none of the previous options can be applied, then the generic name 'bitstream' is used.
Once the download request is processed, the filename will be set in the element "Content-Disposition" of the HTTP response header. To do this, a little modification was made to ensure that the "Content-Disposition" element be always generated.