Fileuploiad refactoring