November 2014
Beginner
182 pages
4h 14m
English
As a rule of thumb for a web script, we have to follow the naming convention as expected by the web script framework in Alfresco. As the web script is supposed to return the response in the JSON and XML formats, we need to create two response templates for the web script. Following the naming conventions, there are two files to be created—contentlocation.get.json.ftl and contentlocation.get.xml.ftl as response templates. Return filesystem_location and size in the response as follows:
contentlocation.get.json.ftl that has the following content:{
"content" :
{
"filesystem_location" : "${contentFSLocation}",
"size" : ${contentSize}
}
}Read now
Unlock full access