Convert a HTML POST to a matlab command sequence / POST text file to a webinterface

2 ビュー (過去 30 日間)
Tobias Wagner
Tobias Wagner 2020 年 4 月 8 日
回答済み: wonderkismet 2020 年 9 月 25 日
Hey,
i need to post a configuration (text) file to a webinterface. Therefore i want to convert the following html post into a matlab command sequence:
<td className="dsR6">__lbl:CONFIG_CMD_CONFIG_LOAD__</td>
<td>
<form action="/" method="post"
encType="multipart/form-data">
<p>
<input type="file" name="configfile" accept=".xxx" />
</p>
<p>
<input type="submit" id="uploadButton" className="btn_submit" value="Upload" disabled="disabled" />
</p>
</form>
I have tried a lot, but it doesn't want to work.
The following lines are my current code. I have read the text file into a variable (data) and try to post this to the webinterface.
options = weboptions('RequestMethod', 'post','MediaType','multipart/form-data');
rsp = webwrite('http://192.168.x.x/', data, options)

回答 (1 件)

wonderkismet
wonderkismet 2020 年 9 月 25 日
https://www.mathworks.com/help/matlab/ref/matlab.net.http.io.multipartprovider-class.html

カテゴリ

Help Center および File ExchangeMATLAB Report Generator についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by