How to add internet content from a URL using ipfs-http-client

Hello everyone,

You can use the ipfs-http-client Javascript library to add internet content from a URL. In order to do so, please follow the below steps:
Install the library from the official ipfs-http-client.
Add the content to your Infura IPFS project using the URL source of a file on the internet or the URL of an already uploaded file on IPFS.
Don’t forget to use your Project ID and Project Secret.

const {ipfsClient, urlSource, create} = require('ipfs-http-client')
const projectId = '27…XXX';
const projectSecret = '20…XXX';
async function addUrl(){
  const auth =
    'Basic ' + Buffer.from(projectId + ':' + projectSecret).toString('base64')
    const client =  create({
        host: '',
        port: 5001,
        protocol: 'https',
        headers: {
          authorization: auth
     const file = await client.add(urlSource(''))