As reported, I tried following the documentation:
const formData = new FormData();
formData.append("channel", "listed");
formData.append("upload", fs.createReadStream(xpiPath));
const response = await axios.post("https://addons.mozilla.org/api/v5/addons/upload", formData, {
headers: {
Authorization: `JWT ${token}`,
"Content-Type": "multipart/form-data"
}
});
console.log(response.data);
but instead of getting the following JSON structure:
{
"uuid": "",
"channel": "listed",
"processed": true,
"submitted": true,
"url": "",
"valid": true,
"validation": {},
"version": ""
}
Iām getting
{
"page_size": 25,
"page_count": 1,
"count": 0,
"next": null,
"previous": null,
"results": []
}