#3824 File upload improvements. First part of implementation. Need to secure it due to local machine reset.