support file in plain js