Fix a crash in file upload handling
Remove some no-longer needed $this's