Fixed bug with determining upload type.