n8n-nodes-onedrive-business 1.1.5 → 1.1.7
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.
|
@@ -253,8 +253,8 @@ class OneDriveBusiness {
|
|
|
253
253
|
},
|
|
254
254
|
default: '',
|
|
255
255
|
required: true,
|
|
256
|
-
placeholder: '/Documents/
|
|
257
|
-
description: '
|
|
256
|
+
placeholder: '/Documents/NewFolder/{{ $binary.data.fileName }}',
|
|
257
|
+
description: 'Full path of the file to save (e.g. /Documents/report.pdf). Tip: Use Expression to keep original name: /Path/To/Folder/{{ $binary.data.fileName }}',
|
|
258
258
|
},
|
|
259
259
|
{
|
|
260
260
|
displayName: 'Binary Property',
|
package/dist/utils/helpers.js
CHANGED
|
@@ -76,7 +76,10 @@ function buildItemPath(drivePath, itemPath, itemId) {
|
|
|
76
76
|
return `${drivePath}/items/${itemId}`;
|
|
77
77
|
}
|
|
78
78
|
if (itemPath) {
|
|
79
|
-
|
|
79
|
+
// Strip standard Graph API prefixes if present
|
|
80
|
+
// Matches: /drive/root:, drive/root:, /drives/{id}/root:, drives/{id}/root:
|
|
81
|
+
let cleanPath = itemPath.replace(/^(\/)?(drive|drives\/[^\/]+)\/root:/i, '');
|
|
82
|
+
const sanitized = sanitizePath(cleanPath);
|
|
80
83
|
if (sanitized) {
|
|
81
84
|
return `${drivePath}/root:/${sanitized}`;
|
|
82
85
|
}
|