Fixed uploading bug

The upload URL was not passed correctly to the rendered template.