Getting a 401 unauthorized error while trying to upload NFT images to IPFS using Web3.storage

I’m developing a platform for minting NFTs and I’m having trouble with uploading images to IPFS via Web3.storage. Even after carefully inputting my project ID and secret key from my Web3.storage account, I continue to face a 401 authentication error each time I attempt to upload files.

I have also tried creating a new project and generating different API credentials, but unfortunately, I still encounter the same unauthorized response. Has anyone experienced similar authentication issues with Web3.storage? I’m uncertain whether there’s a problem with the way I’m sending in the credentials or if there’s a particular format that I need to follow for the API requests.

Any assistance would be greatly appreciated, as this is hindering my ability to mint NFTs.