Turns out I need to include the enctype
in the form, so the html should be
<form action="classify_upload" method="post" id="upload-form" enctype="multipart/form-data"> <input type="file" name="imagefile" id="imagefile"/> <input type="submit" /></form>