// Using jQuery, set both the enctype and the encoding // attributes to be multipart/form-data. $( "form#upload-form" ) .attr( "enctype", "multipart/form-data" ) .attr( "encoding", "multipart/form-data" ) ;