Update upload.php

Change generate_name() to generate length from settings, only passing string of $file->name to generate_name() rather than $file.