Get node.js parameter in solidity for minting

I have added ipfs link in my solidity contract where I am only able to get transaction for same, but I want to use the same contract for other ipfs links also an my ipfs links are stored in mongoDB, how can I use each ipfs link in my contract by passing paramter ?

you could pass an IPFS url at mint time for an ERC721 token id, or you could use a folder in IPFS for an ERC1155 contract (in this case you have to know the metadata for all the token ids when you upload that data to IPFS in a folder as you can not update late that folder on IPFS)

you could pass an IPFS url at mint time for an ERC721 token id

I have done this.
But for each image i can’t deploy the smart contract again and again, so what can I do.

Check this:

maybe it helps