# Changing file dynamicaly in media node

**URL:** <https://discourse.nodered.org/t/changing-file-dynamicaly-in-media-node/69695>\
**Category:** General\
**Created:** [27 October 2022 21:11 UTC](https://discourse.nodered.org/t/changing-file-dynamicaly-in-media-node/69695 "2022-10-27T21:11:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhoepffner](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jhoepffner/32/69679_2.png) [@jhoepffner](https://discourse.nodered.org/u/jhoepffner)\
**Post date:** [27 October 2022 21:11 UTC](https://discourse.nodered.org/t/changing-file-dynamicaly-in-media-node/69695/1 "2022-10-27T21:11:16Z")

</div>

Hello,  
I search to change dynamicaly an image file in media node.  
I wrote  
msg.payload = {"category": "portraits", "name": "MalouAirodo.jpg"}  
The original image disapears but there is only the "not found" icon.  
The file exist in the category, how can I change it easely and dynamicaly?  
Thak you,  
Jacques

---

<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:** [27 October 2022 21:21 UTC](https://discourse.nodered.org/t/changing-file-dynamicaly-in-media-node/69695/2 "2022-10-27T21:21:46Z")

</div>

> [@jhoepffner](#):
>
> msg.payload = {"category": "portraits", "name": "MalouAirodo.jpg"}

Is that what the built in help says to send to the node?

---

<div class="post-metadata">

**Author:** ![jhoepffner](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jhoepffner/32/69679_2.png) [@jhoepffner](https://discourse.nodered.org/u/jhoepffner)\
**Post date:** [29 October 2022 07:30 UTC](https://discourse.nodered.org/t/changing-file-dynamicaly-in-media-node/69695/3 "2022-10-29T07:30:01Z")

</div>

Finaly, searching the forum, I found the working solution:  
msg.payload = portrait/MalouAirodo.jpg (as string)  
Thank you, Jacques

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [12 November 2022 07:30 UTC](https://discourse.nodered.org/t/changing-file-dynamicaly-in-media-node/69695/4 "2022-11-12T07:30:05Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
