Found the fix

Had to return a Javascript object with key file to pass the correct value. Fixed.