Send video as attachment from url
I'm trying to send a video as an attachment but I'm getting an error
What am I doing wrong?
If I upload from my client itself I see an attachment object that looks like this
Which fields do I need to include?
{
url: 'https://cdn.discordapp.com/attachments/1070007323961085973/1170777477723979988/395548916_313950368025649_163387286946890286_n.mp4?ex=655a467e&is=6547d17e&hm=c2646af1ffc78e9d4e880e179582d5f2b9f0b8138bd5ed723cef8027789f98a2&',
proxyURL: 'https://media.discordapp.net/attachments/1070007323961085973/1170777477723979988/395548916_313950368025649_163387286946890286_n.mp4',
width: 480,
height: 854
} {
url: 'https://cdn.discordapp.com/attachments/1070007323961085973/1170777477723979988/395548916_313950368025649_163387286946890286_n.mp4?ex=655a467e&is=6547d17e&hm=c2646af1ffc78e9d4e880e179582d5f2b9f0b8138bd5ed723cef8027789f98a2&',
proxyURL: 'https://media.discordapp.net/attachments/1070007323961085973/1170777477723979988/395548916_313950368025649_163387286946890286_n.mp4',
width: 480,
height: 854
}TypeError: Cannot read properties of undefined (reading 'path')TypeError: Cannot read properties of undefined (reading 'path')What am I doing wrong?
If I upload from my client itself I see an attachment object that looks like this
{
"contentType": "video/mp4",
"description": null,
"ephemeral": false,
"height": 854,
"id": "1171519663264505896",
"name": "395548916_313950368025649_163387286946890286_n.mp4",
"proxyURL": "https://media.discordapp.net/attachments/1077725097936310452/1171519663264505896/395548916_313950368025649_163387286946890286_n.mp4?ex=655cf9b5&is=654a84b5&hm=6451e0b04d97fa63413c063e8d0110ee5032f72b8a82e7252859eea154ce120e&",
"size": 596512,
"spoiler": false,
"url": "https://cdn.discordapp.com/attachments/1077725097936310452/1171519663264505896/395548916_313950368025649_163387286946890286_n.mp4?ex=655cf9b5&is=654a84b5&hm=6451e0b04d97fa63413c063e8d0110ee5032f72b8a82e7252859eea154ce120e&",
"width": 480
} {
"contentType": "video/mp4",
"description": null,
"ephemeral": false,
"height": 854,
"id": "1171519663264505896",
"name": "395548916_313950368025649_163387286946890286_n.mp4",
"proxyURL": "https://media.discordapp.net/attachments/1077725097936310452/1171519663264505896/395548916_313950368025649_163387286946890286_n.mp4?ex=655cf9b5&is=654a84b5&hm=6451e0b04d97fa63413c063e8d0110ee5032f72b8a82e7252859eea154ce120e&",
"size": 596512,
"spoiler": false,
"url": "https://cdn.discordapp.com/attachments/1077725097936310452/1171519663264505896/395548916_313950368025649_163387286946890286_n.mp4?ex=655cf9b5&is=654a84b5&hm=6451e0b04d97fa63413c063e8d0110ee5032f72b8a82e7252859eea154ce120e&",
"width": 480
}Which fields do I need to include?