corrected upload controller