How to load data files from the user's computer into a Processing.js sketch?
in
Processing with Other Languages
•
5 months ago
I'm building a visualization tool that displays gene sequence alignments from various file formats. I need users to be able to upload their own sequence alignment data. The program ought to run in a web browser.
The Java version of Processing includes selectInput() which opens an operating system-specific dialogue box that enables users to select a file. From a functional perspective, this is perfect.
But what is the best way to do this in a web app?
I've slurped data from the web into a sketch before, but for various reasons beyond my comprehension the data needs to be housed on the same server as the sketch. Does this mean users need to upload their data to my server via an HTML form, then download it into the program? Seems sort of cumbersome, no?
Should I be using an older version of Processing so I can export it as a Java applet? Or does selectInput() not work from an applet either?
Any suggestions would be most appreciated.
Thanks,
Jamie
1