updated the plupload and upload functions