Ensuring CORS works correctly for uploads