@ResponseBody
public StartAttachmentUploadResponse save(@RequestBody final StartAttachmentUploadRequest request, final Principal principal) {
LOGGER.debug("Saving the metadata for the attachment: " + request);
final long userId = getUserId(principal);
final long attachmentId = attachmentManagement.newAttachment(userId, request.filename, request.sizeInBytes);
return new StartAttachmentUploadResponse(request.filename, attachmentId);
}