This error message...
org.openqa.selenium.InvalidSelectorException: invalid selector: Unable to locate an element with the xpath expression //input[@id="attachmentUpload-file0"]// because of the following error:
SyntaxError: Failed to execute 'evaluate' on 'Document': The string '//input[@id="attachmentUpload-file0"]//' is not a valid XPath expression.
...implies that your xpathXPath expression was not a valid one.
You can use the following line of code :
driver.findElement(By.xpath("//input[@id='attachmentUpload-file0']")).sendKeys("test");