# Upload file to Synology Filestation over API

**URL:** <https://discourse.nodered.org/t/upload-file-to-synology-filestation-over-api/55529>\
**Category:** General\
**Created:** [21 December 2021 15:53 UTC](https://discourse.nodered.org/t/upload-file-to-synology-filestation-over-api/55529 "2021-12-21T15:53:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![UweG](https://avatars.discourse-cdn.com/v4/letter/u/e495f1/32.png) [@UweG](https://discourse.nodered.org/u/UweG)\
**Post date:** [21 December 2021 15:53 UTC](https://discourse.nodered.org/t/upload-file-to-synology-filestation-over-api/55529/1 "2021-12-21T15:53:55Z")

</div>

Has anyone managed to upload a file to the filestation via synology api using nodered?  
I manage to download files via the api from the synology.  
I can't figure it out from Synology's FileStation API documentation.  
Here is the content of the function node that is connected before the http node and prepares the url to the synology, as well as the header and the payload.

```auto
msg.databuffer=msg.payload;
//Upload File Synology;
msg.DPath="/Ninox";
msg.url=msg.userProperties.SynologyAdress+"/webapi/entry.cgi?api=SYNO.FileStation.Upload&method=upload&version=2&overwrite=true&path="+msg.DPath+"&create_parents=false&_sid="+msg.SynologyID;
msg.headers = {"contenth_length":msg.headers["content-length"],"content-type" : 'multipart/form-data'}
msg.payload ={name:msg.databuffer,
filename:msg.userProperties.FileName+"."+msg.userProperties.FileEndung
}
return msg;

```

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [21 December 2021 16:51 UTC](https://discourse.nodered.org/t/upload-file-to-synology-filestation-over-api/55529/2 "2021-12-21T16:51:27Z")

</div>

Never used the API. But SSH/SCP should work. Alternatively create a suitable file share and allocate that to the device running Node-RED.

---

<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:** [19 February 2022 16:51 UTC](https://discourse.nodered.org/t/upload-file-to-synology-filestation-over-api/55529/3 "2022-02-19T16:51:56Z")

</div>

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