Removed `os` import -- unused. Fixed local_filename kwarg in upload_file().
Removed unused `random` import.
Removed unused imports.