Annoyingly in n8n binary data can only be used from the node before the node you are running so if the Create Folder node doesn’t output the binary item it won’t be in the Upload File node. To get around this you would need to use a merge node from the Code node and the Create Folder node to bring the binary data forward.