Ipfs path and CID is not unique


this is my first time using IPFS as storage solution
In docs i saw that every upload returns unique path but in my case returned Path is same for different uploads

I’m using React to upload files here is code snippests :point_down:

//  function  to  upload  file
const  postMediaUploader = async () => {
// post  video  is  state  value   where  a  file  to  upload  is  stored
   const result = await uploadIpfs(postVideo)
// this  is  the  state  where  i  store  the  uploaded  file  path
       return result

Client config and the function to use to upload files :point_down:

const client =  create ({

  host : "ipfs.infura.io",

  port : 5001,

  protocol: 'https',

  headers: {

    authorization: auth,




// the  function  I'm using  to  upload  data
export const uploadIpfs = async (data) => {

try {

const result = await client.add(JSON.stringify(data));

console.log("ipfs results", result)

return result;

} catch (error) {




In the console.log Here is the results :point_down:

this is the Three different files uploads but it seems like all returned data is same
Is how it should work ? or somthing I’m missing?

You are probably uploading always the same thing and its not the files you would want.
Have you tried to retrieve that URL to see what’s being stored?