handle cancel event correctly with PostFilesTask