There are two things going on here. The first thing is that the code is not ordered correctly, the insert is occurring before the upload. Since the bindings for the upload will not be present until after the file is uploaded you will need to ensure that the upload code comes first.
Second, you need to make use of the DFP binding for the server file name instead of the posted image field. I have made these updates on the page for you so you can take a look and see how it should be setup.