I can’t upload tags of video to vimeo
Can anyone help me, I have a problem uploading tags for videos, my syntax is below
const uploadTagsService = async (videoUri, tags) => {
return new Promise((resolve, reject) => {
client.request({
method: 'PUT',
path: `${videoUri}/tags`,
query: {
tags: tags
}
}, (error, body) => {
if (error) {
reject({ status: 500, message: error.message });
} else {
resolve({ status: 200, message: 'Video tags updated successfully', data: body });
}
});
});
};
My tags be like:
tags = [
{ "name" : "tui1" },
{ "name": "tui2" }
]
Result is:
{
"success": true,
"data": {
"total": 0,
"page": 1,
"per_page": 25,
"paging": {
"next": null,
"previous": null,
"first": "/videos/xxx/tags?page=1",
"last": "/videos/xxx/tags?page=1"
},
"data": []
},
"message": "Video tags updated successfully"
}
Data will be null, I try to change
query: {
tags: tags
}
by body, or data, it still not working
New contributor
Nguyen Quoc Viet is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.