I read the moralis forum looking for the answer and I didn’t get it, they share an api for ipfs called Moralis.EvmApi.ipfs.uploadFolder({});
but try the answer:
ResponseAdapter {
jsonResponse: [
{
path: 'https://ipfs.moralis.io:2053/ipfs/QmW1K1xn8eYUUVBCZd6b9c2d4LabbrDjGAZ9yLEQEL5YEA/YOUR_FILE_PATH'
}
],
getResponse: Æ’(),
__proto__: {
toJSON: Æ’(),
constructor: Æ’ ResponseAdapter(),
output: [
{
path: 'https://ipfs.moralis.io:2053/ipfs/QmW1K1xn8eYUUVBCZd6b9c2d4LabbrDjGAZ9yLEQEL5YEA/YOUR_FILE_PATH'
}
],
raw: [
{
path: 'https://ipfs.moralis.io:2053/ipfs/QmW1K1xn8eYUUVBCZd6b9c2d4LabbrDjGAZ9yLEQEL5YEA/YOUR_FILE_PATH'
}
]
}
}
get the hash like the old
const file = new Moralis.File(data.name, data);
await file.saveIPFS();
file.ipfs()
file.hash()
I have the complete project built, and stored the data in hash, since I can obtain the hash of 1 single file, I don’t want to upload a folder or change the entire code. I already have many migrations.