Coding help for Upload File


Can you please help me with scripting to automate Upload File for this test: create record on webpage and name it with input text as title, save it, then download as .jar file on PC. The downloaded file then needs to be uploaded back on webpage.

Problem is download adds an auto-generated prefix value (i.e. “CS_”) before title and an underline followed by sequence of 16-digit number (i.e. “_ 1488953009061190”) after title. Could you please help with a coding solution where Upload File only “looks” for input title and ignore the pre/after values generated by the download?
The 16-digit number is random, but “CS_” prefix gets included on every download.

Currently after the .jar file is downloaded I copy/paste the path into Upload File input, but I need to fully automate the test by not having to manually insert the path every time.

*For now I’m unable to make Katalon download the file due to Chrome download-warning pop-up, even with Desired Capabilities preferences, but ignoring this issue I would like your help if there is a coding solution for the Upload. As I don’t really have coding knowledge.