SharePoint Error: “Access denied. You do not have permission to perform this action or access this resource” Error while uploading a file or creating a folder in Style Library

I am the global admin, Site owner. I had all the elevated access on the site but still got access denied error while uploading folder with files to Style library. I rechecked my access, every thing was just fine.
Then I had to search for the similar issues and below blog helped me to resolve this –

Happy learning!!