@5minds/node-red-contrib-processcube 1.15.0-develop-635e99-mai2hwzu → 1.15.0-develop-8bd107-mai2rzad

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/node-red-contrib-processcube",
3
- "version": "1.15.0-develop-635e99-mai2hwzu",
3
+ "version": "1.15.0-develop-8bd107-mai2rzad",
4
4
  "license": "MIT",
5
5
  "description": "Node-RED nodes for ProcessCube",
6
6
  "scripts": {
@@ -20,6 +20,13 @@ module.exports = function (RED) {
20
20
  try {
21
21
 
22
22
  function convertGoogleDriveLink(link) {
23
+ // Format 0: https://docs.google.com/document/d/FILE_ID/edit
24
+ const editMatch = link.match(/https:\/\/docs\.google\.com\/document\/d\/([^/]+)/);
25
+ if (editMatch) {
26
+ const fileId = editMatch[1];
27
+ return `https://docs.google.com/document/d/${fileId}/export?format=zip`;
28
+ }
29
+
23
30
  // Format 1: https://drive.google.com/file/d/FILE_ID/view?usp=sharing
24
31
  const fileMatch = link.match(/https:\/\/drive\.google\.com\/file\/d\/([^/]+)\/view/);
25
32
  if (fileMatch) {
@@ -68,7 +75,7 @@ module.exports = function (RED) {
68
75
  }
69
76
  await streamPipeline(response.body, fs.createWriteStream(zipPath));
70
77
 
71
- const zip = new AdmZip(zipPath);
78
+ const zip = new AdmZip(zipPath);
72
79
  zip.extractAllTo(tempDir, true);
73
80
 
74
81
  // === HTML-Datei im obersten Verzeichnis finden ===
@@ -112,7 +119,7 @@ module.exports = function (RED) {
112
119
 
113
120
  msg.payload = new_payload;
114
121
  msg.attachments = attachments;
115
-
122
+
116
123
 
117
124
  node.send(msg);
118
125
  } catch (queryError) {