11-17-2016 02:19 AM
11-22-2016 09:37 PM
folder path parameter should be cn:name property,for example in my environment
http://localhost:8080/alfresco/s/dir/公司主页?verbose=true (of course chinese character need to be encoded)will work
11-23-2016 06:25 AM
Sorry , i was trying the wrong way
It worked now !!
Thanks !!
Just one more query
Can we get the individual size of each file and subfolders inside a folder
11-23-2016 10:32 PM
There is a Java based WebScript in git hub that can calculate folder size ,you can evaluate if it safisfy your needs,if not you can do some customization.
https://github.com/dedunu/filesize-webscript
11-24-2016 01:46 AM
I have not tried any java based webscripts.
I am trying using javascript based webscripts
The tutorial Developing a Folder Listing web script | Alfresco Documentation is fullfilling my requirements
It just need some customization for folder size
Below i have attached the html file in which there is a condition for getting the content size if child is 'document'
Can you please help me to get the size of individual subfolders inside a folder.
What changes should i do in the below code in order to get this ?
dir.get.html.ftl
dir.get.js
11-24-2016 02:50 AM
I think you can write an recursive function to caculate size of folder in your dir.get.js like this. and for every sub folder call this function to caculate folder size,and then present it in dir.get.html.ftl
getNodeSize(node) {
var size = 0;
if(node.isDocument)
{
size=node.getSize();
}
else if(node.isContainer){
var children = node.children;
for (var i = 0; i < children.length; i++)
{
var child = children[i];
size = size + getNodeSize(child);
}
}else{
}
return size;
}
It is just an example ,I have not tested it ,and it has poor performance
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.