Hi
You will need a sendKeys call wich point to your testObject that identifies the input field.
Here is an example testObject common/area_fileUploadxpath is identified by xpath //input[@type=‘file’], which points to this.
Second argument is then the actual full path to your file (as a String). This is best done relatively to your project folder, so it can run also outside your local environment. The path must include the actual file name and extension.
Then in your code
import java.nio.file.Path
import java.nio.file.Paths
import com.kms.katalon.core.testdata.TestDataFactory
import com.kms.katalon.core.configuration.RunConfiguration
//example of file is in this case a "1.pdf"
String attachmentFileInFolder = "1.pdf"
String projectDir = RunConfiguration.getProjectDir()
Path projectPath = Paths.get(projectDir)
Path uploadPath = projectPath.resolve(TestDataFactory.getProjectDir() + "/Data Files/i18n/$attachmentFileInFolder")
File fileToUpload = uploadPath.toFile()
String fileToUploadPath = (fileToUpload.getAbsolutePath())
WebUI.waitForElementPresent(findTestObject('common/area_fileUpload'), 2)
WebUI.sendKeys(findTestObject('common/area_fileUpload'), fileToUploadPath)