add event in sendFileToBrowser