newb question: reading files in client

27 views
Skip to first unread message

David Gladstein

unread,
Jan 5, 2017, 12:20:11 PM1/5/17
to haste-compiler

Hello. I'm thinking of porting a little app to haste. It needs to read an image file, and I want to avoid having a server.

Has anyone managed to read a file client-side in Haste?

Anton Ekblad

unread,
Jan 19, 2017, 12:53:09 PM1/19/17
to haste-compiler
The browser in general does not allow this without user intervention, since that would essentially enable any website to peek at any file on your system - a huge security breach. If you're OK with having the user manually specify the file(s) you want to access, you can use an HTML file element and getFileData[1], but it sounds like this would not really work for your use case. Another thing you might want to consider is using haste-standalone[2], which gives you client-server functionality in a single executable. Note that there are big changes[3] in the pipeline for Haste.App, including haste-standalone, so upgrading from 0.5 to 0.6 in the future might require some porting, if you choose to go this route.


/Anton

On Thu, Jan 5, 2017 at 6:20 PM, David Gladstein <glad...@gladstein.com> wrote:

Hello. I'm thinking of porting a little app to haste. It needs to read an image file, and I want to avoid having a server.

Has anyone managed to read a file client-side in Haste?

--
You received this message because you are subscribed to the Google Groups "haste-compiler" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haste-compiler+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages