# \[Feature Request\]Option to turn off node status on file read node

**URL:** <https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696>\
**Category:** General\
**Created:** [15 January 2022 11:56 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696 "2022-01-15T11:56:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [15 January 2022 11:56 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/1 "2022-01-15T11:56:39Z")

</div>

As we all know, the editor isn't a dashboard 🙂

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/a/9a8e20f0d89e84cf7e189ce6a9656c590d588993.png)

Could there be an option to to turn off the filename node status to help tidy up? 🙂

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [15 January 2022 13:24 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/2 "2022-01-15T13:24:39Z")

</div>

hmm - indeed we normally truncate them to about 32 chars...

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [15 January 2022 15:19 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/3 "2022-01-15T15:19:57Z")

</div>

Indeed - this one slipped the net (maybe the other file nodes are similar?)

I think it would still be nice at 32 to be able to switch it off

When I need the full payload displaying I just use a simple function (well Blockly in my case of course) node

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [15 January 2022 15:34 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/4 "2022-01-15T15:34:09Z")

</div>

Rather than an arbitrary 32 characters perhaps it could be something like `etc/../filename.log` where if the full path is \> 32, replace the middle parts of the path with `../` until 32 or less - so at least we can see the beginning path and the actual filename?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [15 January 2022 17:56 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/5 "2022-01-15T17:56:45Z")

</div>

Feel free to suggest a PR 🙂

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [15 January 2022 17:58 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/6 "2022-01-15T17:58:38Z")

</div>

That old chestnut 😂😂😂

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [15 January 2022 19:00 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/7 "2022-01-15T19:00:42Z")

</div>

Hey - this is a team game you know 🙂

---

<div class="post-metadata">

**Author:** ![shrickus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/shrickus/32/517_2.png) [@shrickus](https://discourse.nodered.org/u/shrickus)\
**Post date:** [16 January 2022 03:05 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/8 "2022-01-16T03:05:13Z")

</div>

> [@Steve-Mcl](#):
>
> so at least we can see the beginning path and the actual filename?

I like this idea -- and I would add a request to set a hover "title" that includes the entire string, so the truncated data can still be visible, if necessary.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [20 January 2022 16:25 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/9 "2022-01-20T16:25:17Z")

</div>

@Steve-Mcl - so no more excuses from you now !.... Great to have you on the team.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [20 January 2022 16:31 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/10 "2022-01-20T16:31:36Z")

</div>

Haha, thanks Dave.

Regarding this particular request - I did have a play with it.

Got this far if anyone wants to test it with a bunch of paths...

`https://replit.com/@StephenMcLaughl/longpathshrinkfordisplay#index.js`

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [20 January 2022 16:51 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/11 "2022-01-20T16:51:40Z")

</div>

that looks good to me. I'd be happy with that. There is always an edge case (the last one) ... but overall much better.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [20 January 2022 17:01 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/12 "2022-01-20T17:01:26Z")

</div>

> [@Steve-Mcl](#):
>
> [longpath\_shrink\_for\_display - Replit](https://replit.com/@StephenMcLaughl/longpathshrinkfordisplay#index.js)

I think if 32 is the magic number node status limit, then it shouldn't be anymore than that 🙂  
e.g  
`/home/pi/assda/asdas/asd/asd/asd//asd/asd/asd/dasdsadd/a_very_long_long_ long_long_long_filename.txt`

should be trucnated to  
`...ry_long_long_ long_long_long_filename.txt` - assume this is 32 long 🙂

or  
`/home/..g_long_ long_long_long_filename.txt` if you want to always include starting folder

just rough example 🙂

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [20 January 2022 17:05 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/13 "2022-01-20T17:05:19Z")

</div>

32 isn't hard and fast - just trying not to be overly long or messy compared to the length of typical nodes.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [20 January 2022 17:08 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/14 "2022-01-20T17:08:35Z")

</div>

Yeah, 32 MAX _was_ the aim, however `.` is a valid in a filename so could trip someone up.

I think 32 is the ideal target length but if a user has a 36+ char filename - its up to them TBH

@dceejay @shrickus @cymplecy if you all agree this (what I posted) is acceptable, I will raise a PR.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [20 January 2022 17:16 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/15 "2022-01-20T17:16:06Z")

</div>

Indeed - at some point the user has to take some ownership of their own file naming convention. If we can help nudge them in the right direction I'm happy. (but of course you now have to get mgmt approval for the PR 😉

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [20 January 2022 17:36 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/16 "2022-01-20T17:36:58Z")

</div>

I think if the user wants the full file name - then they can just add their own simple status node (I use them all the time myself but don't tell @dceejay! )

But code nodes should stick to the rules 🙂

So, I think the status should just stick to the 32 "rule" and just simply truncate.

PS In the OP - I have no control over the folder structure and the filename is going to be enormous as it is a text-speech operation

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [20 January 2022 17:51 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/17 "2022-01-20T17:51:20Z")

</div>

(I saw that.... noted...)  
Well if we think that truncating it makes it useless/less useful then maybe not bother show it at all if over length... (but use Steve's rules to shrink first... ) - will save websocket bandwidth as well 🙂

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [20 January 2022 18:25 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/18 "2022-01-20T18:25:34Z")

</div>

Or maybe go back to my original request and just have a flag to switch it off or on?

Or have both - switch it off or on - if on - use Steve's algo

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [20 January 2022 18:41 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/19 "2022-01-20T18:41:44Z")

</div>

I'm not Jonny Ive - but I do hate too many options.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [20 January 2022 18:42 UTC](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696/20 "2022-01-20T18:42:45Z")

</div>

A combination could work.

I've updated the demo.

| Path | Length |
| --- | --- |
| `a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/file.txt` | 60 |
| `a/../r/s/t/u/v/w/x/y/z/file.txt` | 31 |
| - | - |
| `aaa/bbb/ccc/ddd/eee/fff/ggg/hhh/iii/jjj/kkk/lll/mmm/file.txt` | 60 |
| `aaa/../jjj/kkk/lll/mmm/file.txt` | 31 |
| - | - |
| `/aaa/bbb/ccc/ddd/eee/fff/ggg/hhh/iii/jjj/kkk/lll/mmm/file.txt` | 61 |
| `/../iii/jjj/kkk/lll/mmm/file.txt` | 32 |
| - | - |
| `user/pi/source/github/node-red/nodes/contrib/e-x-t-r-a---l-o-n-g---f-i-l-e---n-a-m-e.txt` | 88 |
| `user/../e-x-t-r-a---l-o-n-g--...` | 32 |
| - | - |
| `user/pi/source/github/node-red/nodes/contrib/looooooooooong-file-name.txt` | 73 |
| `user/../looooooooooong-file-n...` | 32 |
| - | - |
| `user/pi/source/github/nr/nodes/contrib/long-ish-name.txt` | 56 |
| `user/../long-ish-name.txt` | 25 |
| - | - |
| `user/pi/src/git/nr/nodes/contrib/package.json` | 45 |
| `user/../contrib/package.json` | 28 |
| - | - |
| `user/pi/src/contrib/package.json` | 32 |
| `user/pi/src/contrib/package.json` | 32 |
| - | - |
| `user/pi/src/repos/github/` | 25 |
| `user/pi/src/repos/github/` | 25 |
| - | - |
| `user/pi/readme.md` | 17 |
| `user/pi/readme.md` | 17 |
| - | - |
| `user/long-middle-bit-path-entry/readme.md` | 41 |
| `user/../readme.md` | 17 |
| - | - |
| `long-base-directory/pi/the-read-me-file.md` | 42 |
| `long-base-directory/../the-re...` | 32 |

* * *

How does that feel?

There are more options, e.g. if filename is \> 32, simply drop the leading path altogether?

[Next page](https://discourse.nodered.org/t/feature-request-option-to-turn-off-node-status-on-file-read-node/56696.md?page=2)
