Hello Everyone,
While downloading the file from Appliaction UI we are getting file name as "eb3e60e5-ae30-4a7b-8321-8cd2dcf2b7b9" instead of original file name as in alfresco like AS_ID.
this is my sample code written in java:
void dowload(DownloadRequest dr, HttpServletResponse hResponse){
CloseableHttpClient httpClient = HttpClientBuilder.create().build();
HttpGet httpGet = new HttpGet(dr.getUrlToDownload());
HttpResponse response = httpClient.execute(httpGet);
HttpEntity entity = response.getEntity();
if (entity != null) {
// code to read file content
}
hResponse.setHeader("Content-Disposition", "attachment; filename=\"" + dr.getFileName() + "\"");
}
can anyone help me out how to download file with exact filename.