[SOLVED] Upload image URL to IPFS in self hosted server

hi @cryptokid @YosephKS

how to upload image URL to IPFS in parse server ?

Is it possible to using await Moralis.Cloud.toIpfs this code to get IPFS URL.

Because previously i am using this code in our Moralis cloud function and its working fine. so please guide us.

I have already try below API , but this only work with JSON and base64 content.

How were you uploading an image url to ipfs previously? From what I know you can not upload an image url, you upload metadata that is a json that contains an image url.

thank you for fast reply @cryptokid

Please check below code, that i am using in our cloud function

const image = await Moralis.Cloud.toIpfs({
      sourceType: 'url',
      source: imageURL,
    });

https://v1docs.moralis.io/moralis-dapp/cloud-code/cloud-functions#url

You are trying to upload the data that is could at that url? In this case you have to upload the contents of the data from that url as base64 encoded and using uploadFolder

ok got it @cryptokid

thanks for support

2 Likes