Meta data can be set only for a drive item stored in document library

Hi All,

I am facing an issue while uploading a file with Meta data On SharePoint

When I am not giving meta data it is uploading in default folder but I need to upload to. Particular folder using meta data.

My columns are like Category and sub-Category
When I pass this on my dev it sat on particular folder. But on production it s failing.(Both dev and production are different SharePoint sites but folder structure is same)

Kindly assiyt