How can I get image file in web app?

3 ビュー (過去 30 日間)
Kyoungseo Kim
Kyoungseo Kim 2021 年 7 月 25 日
コメント済み: Kyoungseo Kim 2021 年 7 月 26 日
Hi, I am using R2021a version, and I made a web app that gets image file as input, and shows image processing result for that image.
When I tried to run the app right away in app designer, it worked well.
However, when I made it as web app, and ran in localhost, I found an error message saying format of image taken by uigetfile is not supported.
Above is my code, and below is an error message and error cause shown by try catch statement. The last sentece is saying like 'Cannot configure file format'.
And this is value of app.target_img_addr :
It seems uigetfile reads the file from the client pc, and saves it in server session, and then imread reads that file from the server pc itself.
And apparently, when I took a look at the above address, I could not read the test.png in server session.
This means that uigetfile didn't save the file perfectly, and thus imread cannot read the file.
So, is matlab web app server not supporting uigetfile? or did I do something wrong?
If it is the former case, what is an alternative way to get image file from user?

採用された回答

Jan
Jan 2021 年 7 月 25 日
I assume, this is a bug of R2021a. Please contact the official support of MathWorks to ask for a solution.
  5 件のコメント
Jan
Jan 2021 年 7 月 25 日
Press "report a bug". You can insert a link to your question here also.
Kyoungseo Kim
Kyoungseo Kim 2021 年 7 月 26 日
Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Web App Server についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by