Mercurial > hg > human-echolocation-java-webapp
comparison src/HumanEchoServlet.java @ 67:b8f8ed1ef8dd tip
Provide .wav suffix in delivered filename
author | Chris Cannam |
---|---|
date | Tue, 30 Sep 2014 16:52:50 +0100 |
parents | 21bab43ae2c1 |
children |
comparison
equal
deleted
inserted
replaced
66:e3ae02f26375 | 67:b8f8ed1ef8dd |
---|---|
196 | 196 |
197 logger.info("About to read WAV data from \"" + target + "\""); | 197 logger.info("About to read WAV data from \"" + target + "\""); |
198 | 198 |
199 //set response headers | 199 //set response headers |
200 response.setContentType("audio/x-wav"); | 200 response.setContentType("audio/x-wav"); |
201 response.addHeader("Content-Disposition","attachment; filename=" + outputfname ); | 201 response.addHeader("Content-Disposition","attachment; filename=" + outputfname + ".wav"); |
202 response.setContentLength( (int) targetFile.length( ) ); | 202 response.setContentLength( (int) targetFile.length( ) ); |
203 | 203 |
204 FileInputStream input = new FileInputStream(targetFile); | 204 FileInputStream input = new FileInputStream(targetFile); |
205 buf = new BufferedInputStream(input); | 205 buf = new BufferedInputStream(input); |
206 | 206 |