n8n-nodes-late
Version:
n8n community node for LATE API - Schedule and manage social media posts across Twitter/X, Instagram, Facebook, LinkedIn, TikTok, YouTube, and Threads
25 lines • 1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.mediaResource = void 0;
const commonFields_1 = require("../utils/commonFields");
exports.mediaResource = {
operations: [
{
name: "Upload",
value: "upload",
action: "Upload media",
routing: {
request: {
method: "POST",
url: "/media",
headers: {
"Content-Type": "multipart/form-data",
},
body: "={{ $parameter.files?.items?.reduce((acc, item) => { acc[`file_${Date.now()}_${Math.random()}`] = { value: item.data, options: { filename: item.filename || 'upload', contentType: item.mimeType || 'application/octet-stream' } }; return acc; }, {}) || {} }}",
},
},
},
],
fields: [(0, commonFields_1.buildMediaFilesField)("media", ["upload"])],
};
//# sourceMappingURL=media.js.map