<%_ if (position === 'import') { _%>
<%_ } _%>
<%_ if (position === 'method') { _%>

     /**
     * {@code POST  /upload-files} : Create a new uploadFile.
     *
     * @param uploadFileDTO the UploadFileDTO to create.
     * @param file the uploadFile to create.
     * @return the {@link ResponseEntity} with status {@code 201 (Created)} and with body the new uploadFileDTO, or with status {@code 400 (Bad Request)} if the uploadFile has already an ID.
     * @throws URISyntaxException if the Location URI syntax is incorrect.
     */
    @PostMapping("/upload-files")
    public ResponseEntity<UploadFileDTO> createUploadFile(
        @RequestPart(required = false) UploadFileDTO uploadFileDTO,
        @RequestPart("file") MultipartFile file
    ) throws Exception {
        log.debug("REST request to save UploadFile : {}", file.getOriginalFilename());
        if (file.isEmpty()) {
            throw new BadRequestAlertException("A new uploadImage cannot null", ENTITY_NAME, "imageisnull");
        }
        if (Objects.isNull(uploadFileDTO)) {
            uploadFileDTO = new UploadFileDTO();
        }
        uploadFileDTO.setFile(file);
        UploadFileDTO result = uploadFileService.save(uploadFileDTO);
        return ResponseEntity.created(new URI("/api/upload-files/" + result.getId()))
            .headers(HeaderUtil.createEntityCreationAlert(applicationName, true, ENTITY_NAME, result.getId().toString()))
            .body(result);
    }
<%_ } _%>
