// Create a mapper to deliver the auto-download of the file. We have to
// create a dedicated mapper here
// and can not reuse the standard briefcase way of file delivering, some
// very old fancy code
// Mapper is cleaned up automatically by basic controller
String baseUrl = registerMapper(new Mapper() {
public MediaResource handle(String relPath, HttpServletRequest request) {
OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(ProjectBrokerManagerFactory.getProjectBrokerManager().getAttamchmentRelativeRootPath(project,courseEnv,cNode),null);
VFSLeaf vfsfile = (VFSLeaf) rootFolder.resolve(relPath);
if (vfsfile == null) {
return new NotFoundMediaResource(relPath);