use a query string for upload type and set action within imgupload.js