Can I save to a file on web/server?

28 views
Skip to first unread message

Jack Dale

unread,
Jun 16, 2019, 10:11:54 PM6/16/19
to emscripten-discuss
Most probably the answer is no but I still want to ask, is there a way to write onto a sqlite database file on our website/server(shared hosting) using emscripten?

Jukka Jylänki

unread,
Jun 17, 2019, 6:39:08 AM6/17/19
to emscripte...@googlegroups.com
You can only do whatever you can also do in regular JavaScript running
in user's browser, WebAssembly does not give any more powers. If you
compile Sqlite to Wasm, and run it in a browser, then the sqlite
database resides in the user's local web browser memory. You can
upload that database file to a server by developing an endpoint to
your server, e.g. via HTTP POST or a HTTP PUT, or perhaps using
WebSockets.

ma 17. kesäk. 2019 klo 5.11 Jack Dale (jackdal...@gmail.com) kirjoitti:
>
> Most probably the answer is no but I still want to ask, is there a way to write onto a sqlite database file on our website/server(shared hosting) using emscripten?
>
> --
> You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/199f38c8-f193-4b1b-adc0-7457dff43462%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Shlomi Fish

unread,
Jun 18, 2019, 7:02:41 AM6/18/19
to emscripten-discuss, Jack Dale


Begin forwarded message:

Date: Mon, 17 Jun 2019 10:56:09 +0300
From: Shlomi Fish <shl...@shlomifish.org>
To: emscripte...@googlegroups.com
Subject: Re: Can I save to a file on web/server?


On Sun, 16 Jun 2019 19:11:54 -0700 (PDT)
Jack Dale <jackdal...@gmail.com> wrote:

> Most probably the answer is no but I still want to ask, is there a way to
> write onto a sqlite database file on our website/server(shared hosting)
> using emscripten?
>

Hi Jack!

You can using https://en.wikipedia.org/wiki/Server-side_scripting and
https://en.wikipedia.org/wiki/Ajax_%28programming%29 . Same as normal
browser-side JS.

Jack Dale

unread,
Jun 18, 2019, 7:25:48 PM6/18/19
to emscripten-discuss
Thanks for your answers.

17 Haziran 2019 Pazartesi 05:11:54 UTC+3 tarihinde Jack Dale yazdı:
Reply all
Reply to author
Forward
0 new messages