fix upload, et debug JS