MadeofTin / bellows-riddles-base

Where I keep track of the Bellow's Riddle Quest data so I can share it with my team
4 stars 2 forks source link

Can you access local files from javascript? #2

Closed MadeofTin closed 9 years ago

MadeofTin commented 9 years ago

I was wondering if in the UX testing you could just load the riddles.json relative to it but I couldn't figure it out. I am not very good at javascript...

pcardune commented 9 years ago

you can't do it programmatically, only if someone actually selects the file with the file selector. What you could do is use jsonp. i.e. take riddles.json and wrap it in

someFunc(<whatever is in riddles.json now>);

and then load it with a script tag.

MadeofTin commented 9 years ago

So it would be better to maybe set up a webhook to a script that uploads them to my google storage blob when I do a git push. I just got 500 credits for Google Cloud Storage so want to use it up anyway. Expires in January.