카운트업

function uploadVideo(filePath) { // Create a video resource with the required metadata var videoResource = { snippet: { title: 'My Uploaded Video', description: 'This is a test video uploaded automatically using the YouTube API.', tags: ['test', 'automated'], categoryId: '22' }, status: { privacyStatus: 'unlisted' } }; // Create a media upload object for the video file var media = { mimeType: 'video/mp4', body: fs.createReadStream(filePath) }; // Use the videos.insert() method to upload the video to your channel var request = gapi.client.youtube.videos.insert({ part: 'snippet,status', resource: videoResource, media: media }); request.execute(function(response) { console.log('Video uploaded:', response.snippet.title); }); }