Adding a JSON handler for file uploads