I must admit, no I don't understand what you are doing. In your first post, you said you wanted to "move" the file on upload. Now if it's "copy", that's a different thing, because it means the original will remain in the location where the user uploaded it. Also, I don't know what you mean "copy the picture from server to server", but if it works as intended, that's good. As for "update also the DB", I'm glad you have this resolved, but Files Gallery can't know about what goes in databases for your own application. Just because it's a "CMS" doesn't give me any better ideas about what you are trying to do.
Unfortunately, "Does this feature already exist" I don't know what you are asking for. It's not reasonable to expect Files Gallery to adjust itself to suit your own native database CMS solution, where files don't even exist in the file system that Files Gallery can access and modify. I already use Files Gallery as a file manager for the X3 Photo Gallery CMS, and I just point the root
to the dir where X3 has it's files, and that's that, no modifications. Files Gallery can view/edit a file system in an elegant way.
Sorry my response sounds negative 🤨🙂