restored functionality for file uploads and downloads