when the dir exists, sftp.mkdir() would raise an error and ends the for loop.
Attach a file by drag & drop or click to upload