Removed duplicated code for fileuploader

@hellais do you enjoy this commit?