How to automatically identify the file path when uploading a file

How to automatically identify the file path when uploading a file
I don’t want to put the file under the project path every time