Clear Filters
Clear Filters

matlab online supports reading local files?

12 views (last 30 days)
It would be good if matlab online could support reading local files in the future, because even using MATLAB Drive Connector to synchronize thousands of images to matlab drive is very painful, tens of thousands of images take up a lot of drive space and synchronization is time-consuming.
If all the images are compressed and uploaded, it is very fast, but using unzip function in matlab online to decompress them, it will take longer and even fail.
  1 Comment
cui,xingxing on 29 Oct 2021
Edited: cui,xingxing on 29 Oct 2021
I found that VScode CodeSpaces supports local file access, and I hope that matlab online will support it perfectly in the future.

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 28 Oct 2021
I do not think that is likely to happen. MATLAB Online only has whatever access to local drives that javascript sent to the browser has, but for security reasons, javascript only has access to files when there is individual user action to make the file available. The file browsers to select what to upload are not just user choice interfaces: they are also mediating permission; javascript is not permitted to access any file that user did not select through the user choice interfaces.
It would be a very bad security idea for websites to be able to silently upload any file they can guess the name of.
MATLAB Online is deliberately designed as a limited resource. If you are working with tens of thousands of images using MATLAB Online, then you are using it beyond the designed resource limits.
MATLAB offers cloud computing with increased resources:
cui,xingxing on 29 Oct 2021
Research into similar products has revealed that vscode online supports access to local files for reading, and I suspect that matlab will be able to do the same in the future.
Walter Roberson
Walter Roberson on 29 Oct 2021
Still requires that the user goes through a picker. It does, however, allow a user to pick a directory.
Only supported on Edge and Google Chrome. There is precedent that sound from Online is only supported for Chrome. However, should circumstances arise in which Mathworks were to be headed to only supporting Chrome + Edge for access to Online, then I would firmly argue against a development. (Read the reports about the unredacted lawsuits against Google in the US by several states... it involves pretty serious allegations that Alphabet is manipulating to force the market to use only Chrome technology because doing so would allegedly give Alphabet advertising market advantages.)

Sign in to comment.


Find more on File Operations in Help Center and File Exchange




Community Treasure Hunt

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

Start Hunting!