Hello,
I am trying to write a script, using python, that uploads videos to my server. I use the API function « /videos/upload ». Everything works, I can specify all the data. Only the tags make problems I always get the following errors:
warn: Incorrect request parameters {
"path": "/api/v1/videos/upload",
"err": {
"tags": {
"value": "('hello', 'super')",
"msg": { "should have correct tags",
}, "param": { "tags",
"location": "body"
}
}
}
I have tried many ways to specify the tags, the only one where this error does not appear is:
("hello", "jojona")
Or
["hello", "jojona"]
but then I get another error:
Server Error
error: Error in controller. {
"err": "MulterError: Unexpected field\n at wrappedFileFilter (/app/node_modules/multer/index.js:40:19)\n at Busboy.<anonymous> (/app/node_modules/multer/lib/make-middleware.js:114:7)\n at Busboy.emit (events.js:198:13)\n at Busboy.emit (/app/node_modules/busboy/lib/main.js:38:33)\n at PartStream.<anonymous> (/app/node_modules/busboy/lib/types/multipart.js:213:13)\n at PartStream.emit (events.js:198:13)\n at HeaderParser.<anonymous> (/app/node_modules/dicer/lib/Dicer.js:51:16)\n at HeaderParser.emit (events.js:198:13)\n at HeaderParser._finish (/app/node_modules/dicer/lib/HeaderParser.js:68:8)\n at SBMH.<anonymous> (/app/node_modules/dicer/lib/HeaderParser.js:40:12)\n at SBMH.emit (events.js:198:13)\n at SBMH._sbmh_feed (/app/node_modules/streamsearch/lib/sbmh.js:159:14)\n at SBMH.push (/app/node_modules/streamsearch/lib/sbmh.js:56:14)\n at HeaderParser.push (/app/node_modules/dicer/lib/HeaderParser.js:46:19)\n at Dicer._oninfo (/app/node_modules/dicer/lib/Dicer.js:197:25)\n at SBMH.<anonymous> (/app/node_modules/dicer/lib/Dicer.js:127:10)\n at SBMH.emit (events.js:198:13)\n at SBMH._sbmh_feed (/app/node_modules/streamsearch/lib/sbmh.js:159:14)\n at SBMH.push (/app/node_modules/streamsearch/lib/sbmh.js:56:14)\n at Dicer._write (/app/node_modules/dicer/lib/Dicer.js:109:17)\n at doWrite (_stream_writable.js:415:12)\n at writeOrBuffer (_stream_writable.js:399:5)\n at Dicer.Writable.write (_stream_writable.js:299:11)\n at Multipart.write (/app/node_modules/busboy/lib/types/multipart.js:290:24)\n at Busboy._write (/app/node_modules/busboy/lib/main.js:81:16)\n at doWrite (_stream_writable.js:415:12)\n at writeOrBuffer (_stream_writable.js:399:5)\n at Busboy.Writable.write (_stream_writable.js:299:11)"
}
My multipart data looks like this:
multipart/form-data
<MultipartEncoder: [(‹ name ›, ‹ Home ›), (‹ licence ›, ‹ 1 ›), (‹ description ›, ‹ test cool ›), (‹ tags ›, (‹ hallo ›, ‹ jojona ›)), (‹ nsfw ›, ‹ false ›), (‹ channelId ›, ‹ 4 ›), (‹ originallyPublishedAt ›, ‹ 2021-03-11T17:00:12+00:00 ›), (‹ category ›, ‹ 11 ›), (‹ language ›, ‹ de ›), (‹ privacy ›, ‹ 1 ›), (‹ commentsEnabled ›, ‹ true ›), (‹ videofile ›, (‹ aZiXjsNSPTQ_1080.mp4 ›, <_io.BufferedReader name=’/home/user/download/peertube/aZiXjsNSPTQ_1080.mp4’>, ‹ video/mp4 ›)), (‹ thumbnailfile ›, (‹ Lo3rSOrksjo.jpg ›, <_io.BufferedReader name=’/home/user/download/peertube/Lo3rSOrksjo.jpg’>, ‹ image/jpeg ›)), (‹ previewfile ›, (‹ Lo3rSOrksjo.jpg ›, <_io.BufferedReader name=’/home/user/download/peertube/Lo3rSOrksjo.jpg’>, ‹ image/jpeg ›)), (‹ waitTranscoding ›, ‹ false ›)]>
I have already found the following posts about this in the forum but I could not find a solution:
What am I doing wrong, is there a solution?