decord/source/210_convertRequestBody.js

36 lines
909 B
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 210
2026-07-29 08:29:29 +00:00
// Function ID: 211
2026-07-20 16:05:17 +00:00
// Name: convertRequestBody
2026-07-29 08:29:29 +00:00
// Dependencies: [203, 211, 212]
2026-07-20 16:05:17 +00:00
// Module 210 (convertRequestBody)
2026-07-23 10:11:24 +00:00
const require = arg1;
const dependencyMap = arg6;
2026-08-04 21:03:28 +00:00
arg5.default = function convertRequestBody(str) {
if (typeof str === "string") {
2026-07-29 08:29:29 +00:00
let obj = { string: null };
2026-08-04 21:03:28 +00:00
obj[0] = str;
2026-07-29 08:29:29 +00:00
let tmp2 = obj;
2026-08-04 21:03:28 +00:00
} else if (str instanceof require(203) /* Blob */.default) {
2026-07-29 08:29:29 +00:00
obj = { blob: null };
2026-08-04 21:03:28 +00:00
obj[0] = str.data;
2026-07-29 08:29:29 +00:00
tmp2 = obj;
2026-08-04 21:03:28 +00:00
} else if (str instanceof tmp3(211).default) {
2026-07-29 08:29:29 +00:00
const obj1 = { formData: null };
2026-08-04 21:03:28 +00:00
obj1[0] = str.getParts();
2026-07-29 08:29:29 +00:00
tmp2 = obj1;
2026-07-20 16:05:17 +00:00
} else {
const _ArrayBuffer = ArrayBuffer;
2026-08-04 21:03:28 +00:00
if (str instanceof ArrayBuffer) {
2026-07-29 08:29:29 +00:00
obj = { base64: null };
2026-08-04 21:03:28 +00:00
obj[0] = tmp3(212).default(str);
2026-07-29 08:29:29 +00:00
tmp2 = obj;
const tmp3Result = tmp3(212);
2026-07-20 16:05:17 +00:00
} else {
const _ArrayBuffer2 = ArrayBuffer;
2026-08-04 21:03:28 +00:00
tmp2 = str;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
return tmp2;
2026-07-20 16:05:17 +00:00
};