update storage API parameter and  handle spaces in filenames