URI uri = null;
Resource<?> resource = null;
try {
// Parse the resource and store it
logger.debug("Creating new resource at {}", resourceURI);
resource = new FileResourceImpl(resourceURI);
resource.setCreated(user, new Date());
contentRepository.put(resource, true);
uri = new URI(UrlUtils.concat(request.getRequestURL().toString(), resourceURI.getIdentifier()));
} catch (URISyntaxException e) {
logger.warn("Error creating a uri for resource {}: {}", resourceURI, e.getMessage());