use copy/unlink instead of rename() for uploaded files. fix #2745
use copy/unlink instead of rename() for uploaded files. fix #2745

also add a check for is_uploaded_file()

elabftw/elabftw,elabftw/elabftw,elabftw/elabftw,elabftw/elabftw,elabftw/elabftw