use of com.odysseusinc.arachne.portal.api.v1.dto.UploadFilesDTO in project ArachneCentralAPI by OHDSI.
the class BaseAnalysisController method uploadFile.
@ApiOperation("Upload file to attach to analysis.")
@RequestMapping(value = "/api/v1/analysis-management/analyses/{analysisId}/upload", method = POST)
public JsonResult<List<AnalysisFileDTO>> uploadFile(Principal principal, @Valid UploadFilesDTO uploadFilesLinks, @PathVariable("analysisId") Long id) throws PermissionDeniedException, NotExistException, IOException {
IUser user = getUser(principal);
T analysis = analysisService.getById(id);
List<UploadFileDTO> files = Stream.concat(uploadFilesLinks.getFiles().stream(), uploadFilesLinks.getLinks().stream()).collect(Collectors.toList());
return saveFiles(files, user, analysis);
}
Aggregations