Can anyone please share webscript to get the list of all sites,folder, files and the space occupied by them.
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
Please visit http://serverort/alfresco/s/index/all and login with admin account.
This page will list all webscripts installed .
I am following the tutorial Developing a Folder Listing web script | Alfresco Documentation
But i am getting 404 folder not found error for Company Home as described here :
http status code 404 - Alfresco webscript can't find Company Home folder - Stack Overflow Stuck on this !!
Could you please attach your customized webscript here?
<html> <head> <title>Folder ${folder.displayPath}/${folder.name}</title> </head> <body> <p>Alfresco ${server.edition} Edition v${server.version} : dir</p> <p>Contents of folder ${folder.displayPath}/${folder.name}</p> <table> <#list folder.children as child> <tr> <td><#if child.isContainer>d</#if></td> <#if verbose> <td>${child.properties.modifier}</td> <td><#if child.isDocument> ${child.properties.content.size}</#if></td> <td>${child.properties.modified?date}</td> </#if> <td>${child.name}</td> </tr> </#list> </table> </body> </html>
dir.get.js // extract folder listing arguments from URI var verbose = (args.verbose == "true" ? true : false); var folderpath = url.templateArgs.folderpath; // search for folder within Alfresco content repository var folder = roothome.childByNamePath(folderpath); // validate that folder has been found if (folder == undefined || !folder.isContainer) { status.code = 404; status.message = "Folder " + folderpath + " not found."; status.redirect = true; } // construct model for response template to render model.verbose = verbose; model.folder = folder;
and
i am trying hitting the url : http://localhost:8080/alfresco/service/dir/{folderpath}?verbose={verbose?}
but getting the error
i have also tried with the url : http://localhost:8080/alfresco/service/dir/Company%20Home?verbose=true but getting the same error
Hi,
IMO the 404 tells us that your webscript is not correctly deployed on Alfresco.
Can you find your webscript using this URL : http://hostort/alfresco/service/index/uri/ ?
Yann
Webscript is correctly deployed
i am able to see the webscript after hitting this url
Please see the below image :-
Please can you tell how to browse to this page (the screenshot which you have given).