upload dirpath must be string