Which directories WebApp save files?

6 views (last 30 days)
Adriano Mutti
Adriano Mutti on 26 Apr 2022
Answered: Hornett on 27 Sep 2023
I am developing a WebApp in Matlab R2020b and wish to implement features for exporting & downloading files.
I am already using the standard (and documented) functions such as writecell, writetable, etc. which enable to download ASCII files, Excel tables, etc. Downloading pictures from the GUI can also be done successfully.
My questions concern the general case, when files need to be generated fist, and then downloaded:
1) Which directories does the WebApp have access to, so temporary files can be generated there?
2) How can these files be simply downloaded from the WebApp? If I use the command web(), Matlab tries to open the files after downloading them.
Thank you in advance for your reply.

Answers (1)

Hornett
Hornett on 27 Sep 2023
Hi Adriano,
I understand that you want to create a webapp which features downloading file option for user.
For answering your questions:
  1. You can generate temporary files in the directory where your app is running, or you can explicitly mention the directory providing required access rights.
  2. You may use different commands such as websave, webread based on you webapp usage.
You can refer below links for more information:
I hope this information helps in resolving your query.

Categories

Find more on Downloads in Help Center and File Exchange

Tags

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!