CE-1955 clear out uploaded file if user goes back to this step

This commit is contained in:
2024-12-03 20:38:28 -06:00
parent 21aeac2def
commit 1911e27cc0

View File

@ -52,6 +52,14 @@ public class BulkInsertPrepareFileUploadStep implements BackendStep
@Override @Override
public void run(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) throws QException public void run(RunBackendStepInput runBackendStepInput, RunBackendStepOutput runBackendStepOutput) throws QException
{ {
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// if user has come back here, clear out file (else the storageInput object that it is comes to the frontend, which isn't what we want!) //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(runBackendStepOutput.getProcessState().getIsStepBack())
{
runBackendStepOutput.addValue("theFile", null);
}
String tableName = runBackendStepInput.getValueString("tableName"); String tableName = runBackendStepInput.getValueString("tableName");
QTableMetaData table = QContext.getQInstance().getTable(tableName); QTableMetaData table = QContext.getQInstance().getTable(tableName);
BulkLoadTableStructure tableStructure = BulkLoadTableStructureBuilder.buildTableStructure(tableName); BulkLoadTableStructure tableStructure = BulkLoadTableStructureBuilder.buildTableStructure(tableName);