@RequestMapping(value = "/items", method = RequestMethod.POST)
@ResponseBody
public UploadFilesResponse save(@RequestBody UploadFilesRequest uploadFilesRequest, Principal principal) throws IOException {
final RichUser user = get(principal);
long userId = user.getId();
if (user.getLabs().isEmpty()) {
throw new AccessDenied("User isn't permitted to upload file - laboratory is not specified");
}
//todo: verify instrument ID?
final long instrumentId = uploadFilesRequest.instrument;