Copy files from input issue

I need some help with this issue:

I’m developing an app and I need it to upload a file from input file, which is not the problem, and I also need it to make a copy of that file to a folder the app creates. The reason is that if the user is offline, this folder will be used to upload that file later when the user goes online, but I just can’t find a way to make this copy of the file, because I can’t get it’s path.