In which file, File uploading codes are available

I am going to make an app. But i am stuck in one issue. I am unable to find in which file of nextcloud, the codes are available which uploads file.
Please help me to find the file in which file uploading codes are situated.

I am going to make an app which will make a duplicate of uploaded file and will save in same directory with slightly changed name.

Please help me as soon as possible