Download File Naming issue using 6.0.2v of alfresco

Showing results for 
Search instead for 
Did you mean: 
Active Member II

Download File Naming issue using 6.0.2v of alfresco

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. 


1 Reply

Re: Download File Naming issue using 6.0.2v of alfresco

It not quite clear what url you are using and what params are being sent for download request, are creating any custom download webscript or trying to use OOTB download api?

For refrence to use OOTB download api you can look at this class:

If correct url is used and all required params are passed, you should get the file with correct name always. Check the above class for example.

REST API for download file/node is: (It should be HTTP Get request)

GET /alfresco/service/api/node/content/{store_type}/{store_id}/{id}?a=false&alf_ticket={TICKET}



a: means attach. if true, force download of content as attachment. Possible values are true/false
store_type: workspace
store_id: SpacesStore
id: nodeRefId (UUID of the node)

A StoreRef is comprised of:

Store Protocol - that is, the type of store
Store Identifier - the id of the store

Example storeRefs are:

workspace://SpacesStore  (store_type://store_id)
version://versionStore  (store_type://store_id)
archive://SpacesStore  (store_type://store_id)

This post shows example of custom download webscript:


(ACSCE, AWS SAA, Azure Admin)