node-red/red/api/editor
Jeremy Barlow cb35604ef5 Resolve path when sending example file for Windows support
Previously, when trying to import an example into the flow editor on
Windows, the load attempt would fail with an HTTP 404 error in the
browser client, with a `TypeError: path must be absolute or specify
root to res.sendFile` error being written to the Node-RED log. This was
due to the path being passed to the `res.sendFile` function not being
fully-qualified (for example, `\Users\myuser\...\example.json`).

With the changes in this commit, the path to the example file is
resolved to a fully-qualified path before being passed into the
`res.sendFile` call. For example, a path on Windows of
`\Users\myuser\...\example.json` would be transformed to
`C:\\Users\\myuser\\...\\example.json` before being passed along to the
`sendFile` function. This change allows the file to be loaded and sent
properly to the browser client and for the embedded flows in the example
to be loaded in the flow editor.
2018-09-21 08:15:00 -07:00
..
locales Add store arg to sync $flowContext/$globalContext 2018-07-25 10:18:59 +01:00
projects Remove unused references to settings 2018-03-20 00:04:52 +00:00
comms.js Fix debug comms batching with multiple connections 2018-01-28 10:44:02 +00:00
credentials.js Reorganise red/api layout to better componentise 2017-08-22 22:26:29 +01:00
index.js Fix various tests due to projects rework 2018-01-16 16:18:18 +00:00
library.js Resolve path when sending example file for Windows support 2018-09-21 08:15:00 -07:00
locales.js Update i18next in runtime 2018-07-23 23:25:57 +01:00
settings.js Expose list of context stores to the editor 2018-07-03 14:17:42 +01:00
sshkeys.js Remove unused references to settings 2018-03-20 00:04:52 +00:00
theme.js Add projects editorTheme flag to disable the feature 2017-12-13 09:44:48 +00:00
ui.js Reorganise red/api layout to better componentise 2017-08-22 22:26:29 +01:00