Initial public file handling middleware.