Changes to upload servlet to handle different upload types