fix upload in non-chrome browsers