Fixes the document repository's upload/download and delete functions