I tried to use the upload.remote function to upload a .env-file from my local pc to the target directory at the server.
The .env-File is placed in ../private from the perspective of the working directory, where the deploy-script was started /backend.
Nevertheless what I try, I got "Error: No such File".
Found the BUG
I've did some debuging, and figured out, that the implementation of upload.remote was logical wrong:
`
This piece of code shows, that the src is always added to the server-target path.
This fully breaks the functionality, if your src is not equal to a single filename without any path.
I tried to use the
upload.remote
function to upload a.env
-file from my local pc to the target directory at the server. The .env-File is placed in../private
from the perspective of the working directory, where the deploy-script was started/backend
.Nevertheless what I try, I got "Error: No such File".
Found the BUG
I've did some debuging, and figured out, that the implementation of
upload.remote
was logical wrong:`
This piece of code shows, that the src is always added to the server-target path. This fully breaks the functionality, if your
src
is not equal to a single filename without any path.Example:
Will try to upload the file to:
/var/www/serverRoot//home/me/private/myFileToUpload.txt