I'm trying to make an app that will upload files on a ftp server but I keep getting this error 550 Can't change directory to (dir name): No such file or directory. I've checked the path and it's good.

Can someone tell me how to correct this ? I've tested my code on a local server and it works. What am I missing ?