fixing jquery error on upload