Hey Guys.
I think I've found an issue with using preprocess and filesuccess. I'm calling preprocessFinished on each chunk from inside of my preprocess function. The problem is that immediately after my preprocess function returns you have this line in the chunk send method:
this.preprocessState = 1;
So, eventhough the state was just set to 2 in the preprocessFinished method, it has now been set back to 1 after my custom function is run.
Because all chunks stay at 1, the isComplete never returns true and the fileSuccess handler is never called because of this if statement:
if (this.isComplete()) {
this.currentSpeed = 0;
this.averageSpeed = 0;
this.flowObj.fire('fileSuccess', this, message);
}
Am I approaching this wrong at all? Why does the preprocessState of a chunk need to be set to 1 after it's just been set to 2?
I've basically just commented out the line that sets the preprocessState to 1.
Thanks,
Steven Tate
Hey Guys.
I think I've found an issue with using preprocess and filesuccess. I'm calling preprocessFinished on each chunk from inside of my preprocess function. The problem is that immediately after my preprocess function returns you have this line in the chunk send method:
this.preprocessState = 1;
So, eventhough the state was just set to 2 in the preprocessFinished method, it has now been set back to 1 after my custom function is run.
Because all chunks stay at 1, the isComplete never returns true and the fileSuccess handler is never called because of this if statement:
if (this.isComplete()) {
this.currentSpeed = 0;
this.averageSpeed = 0;
this.flowObj.fire('fileSuccess', this, message);
}
Am I approaching this wrong at all? Why does the preprocessState of a chunk need to be set to 1 after it's just been set to 2?
I've basically just commented out the line that sets the preprocessState to 1.
Thanks,
Steven Tate