How can I upload/download a file using the M2Web API?

Hi all,

is it possible to upload or download a file using the M2Web API via FTP put/get command?
In the Reference-Guide of the API there is unfortunately no call/url string for it.
Can someone help me at this point or show me an example call?

Hi Ralf,

I think this post might help you out:

https://techforum.ewon.biz/thread-148.html

Sorry my fault …
Currently i use the M2Web .NET example project and in this way i want to use also the FTP commands.

Hmm maybe this post would be helpful for what you’re trying to do?

I have an IPC connected to a Flexy 205 that automatically uploads files (in this case a text file) to the Flexy via an FTP connection.
I would like to download this text file to my local PC via M2Web api now - if this is possible.
Or is it possible to load this text file as WebRequest and parse it afterwards?
Is there another way to load/read/parse the data from the text file using the API?

You can’t send a file using the Web API (over HTTP), however, you could use the API to send a POST command to run a script which will send the file by FTP or email.

See the RG-003 Web Reference Guide, Section 1.4.3, Special FORMS - Execute an eWON script:

RG-003-0-EN-(Web Reference Guide).pdf (206.3 KB)

They have some examples.

Thanks for the advice.
I’ll take a look at this and see if I can use it for my application.