Where the magic happens

The conditional determines if the no prompt option is true (no prompt), if so the file gets uploaded and script proceeds.