Source:
<code><START> public void uploadFlowFile(final int projectId, final int projectVersion, final int flowVersion, <END> final File flowFile) throws ProjectManagerException { logger.info(String .format( "Uploading flow file %s, version %d for project %d, version %d, file length is [%d bytes]", flowFile.getName(), flowVersion, projectId, projectVersion, flowFile.length())); if (flowFile.length() > MAX_FLOW_FILE_SIZE) { throw new ProjectManagerException("Flow file length exceeds 10 MB limit."); } final byte[] buffer = new byte[MAX_FLOW_FILE_SIZE]; final String INSERT_FLOW_FILES = "INSERT INTO project_flow_files (project_id, project_version, flow_name, flow_version, " + "modified_time, " + "flow_file) values (?,?,?,?,?,?)"; try (final FileInputStream input = new FileInputStream(flowFile); final BufferedInputStream bufferedStream = new BufferedInputStream(input)) { final int size = bufferedStream.read(buffer); logger.info("Read bytes for " + flowFile.getName() + ", size:" + size); final byte[] buf = Arrays.copyOfRange(buffer, 0, size); try { this.dbOperator .update(INSERT_FLOW_FILES, projectId, projectVersion, flowFile.getName(), flowVersion, System.currentTimeMillis(), buf); } catch (final SQLException e) { throw new ProjectManagerException( "Error uploading flow file " + flowFile.getName() + ", version " + flowVersion + ".", e); } } catch (final IOException e) { throw new ProjectManagerException( String.format( "Error reading flow file %s, version: %d, length: [%d bytes].", flowFile.getName(), flowVersion, flowFile.length())); } }</code><technical_language>projectVersion change upload a new zip</technical_language>

Target:
public void uploadFlowFile(final int projectId, final int projectVersion, final int flowVersion, final File flowFile) throws ProjectManagerException { logger.info(String .format( "Uploading flow file %s, version %d for project %d, version %d, file length is [%d bytes]", flowFile.getName(), flowVersion, projectId, projectVersion, flowFile.length())); if (flowFile.length() > MAX_FLOW_FILE_SIZE_IN_BYTES) { throw new ProjectManagerException("Flow file length exceeds 10 MB limit."); } final byte[] buffer = new byte[MAX_FLOW_FILE_SIZE_IN_BYTES]; final String INSERT_FLOW_FILES = "INSERT INTO project_flow_files (project_id, project_version, flow_name, flow_version, " + "modified_time, " + "flow_file) values (?,?,?,?,?,?)"; try (final FileInputStream input = new FileInputStream(flowFile); final BufferedInputStream bufferedStream = new BufferedInputStream(input)) { final int size = bufferedStream.read(buffer); logger.info("Read bytes for " + flowFile.getName() + ", size:" + size); final byte[] buf = Arrays.copyOfRange(buffer, 0, size); try { this.dbOperator .update(INSERT_FLOW_FILES, projectId, projectVersion, flowFile.getName(), flowVersion, System.currentTimeMillis(), buf); } catch (final SQLException e) { throw new ProjectManagerException( "Error uploading flow file " + flowFile.getName() + ", version " + flowVersion + ".", e); } } catch (final IOException e) { throw new ProjectManagerException( String.format( "Error reading flow file %s, version: %d, length: [%d bytes].", flowFile.getName(), flowVersion, flowFile.length())); } }