Correctly handle none basename paths on upload.