JavaScript file to byte[]

前端 未结 5 1711
野趣味
野趣味 2021-01-12 14:14

Is it possible to read a file in from a path in JavaScript and create a byte[] of that file?

5条回答
  •  孤街浪徒
    2021-01-12 14:43

    You guys seem to have completely forgotten mobile platforms and javascript designed to run with no-security flags set what-so-ever. I access my files just fine in my javascript code, which runs on my iPhone. You just cant access the users filesystem, only your own filesystem which is basically a folder isolated from the rest of the system.

    Sp his question was perfectly valid. Also - you should look up Javascript blobs (binary large objects) and typed arrays. You can allocate "normal" byte, word and longword arrays in JS - but people rarely use them.

提交回复
热议问题