When creating NFT’s, I give users the option to either upload media to Moralis IPFS or ‘regular’ cloud storage. IPFS works fine, but the video uploaded to Moralis Cloud Storage does not work/render, although the size of the player is correct:
Same video but uploaded on IPFS: https://ipfs.moralis.io:2053/ipfs/QmTv2Tx9XQeLrvg8rs9LCCih6FrHt2mXs3LVBt23ZD7eE7
An uploaded image works fine (ok not here in preview hehe, but it works):
https://5q6ce5oht43m.moralis.io:2053/server/files/yHoH5zgSj7XR4r53B76MoBRSZ7NkzUSC29jcY26K/9151f0b4daae1e40098fb054ed910c13_fox.png
const nftVideo = new Moralis.File(item.animationFile.name, item.animationFile)
if (IPFSUpload.value) {
///store video on IPFS
nftVideo.saveIPFS().then(() => {
console.log(nftVideo.ipfs());
item.animation_url = 'ipfs://'+nftVideo.hash()
console.log('nftVideo uploaded', item.animation_url)
resolve()
}, (error) => {
console.error('ERROR uploading video to Moralis IPFS')
});
} else {
///store animation on Moralis Storage
nftVideo.save().then((response) => {
console.log('nftVideo uploaded', response)
item.animation_url = response._url
resolve()
}, (error) => {
console.error('ERROR uploading video to Moralis storage')
reject()
});
}
console.log(‘nftVideo uploaded’, response):
No errors, all looks fine, just the video does not play from remote url.