MSS-67: Improved handling of file uploads