streaming file upload

51 views
Skip to first unread message

karo

unread,
Nov 18, 2011, 4:45:20 AM11/18/11
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Hi
I'm pretty new to nitrogen, but I wondered if the following is
possible:
I would like to make a file upload where the incoming chunks are
directly processed and some output is given on the web page.
The file might be pretty big, so I want to see immediate feedback,
while the file is being uploaded and I don't want to wait until the
whole file is uploaded.
Can anyone point me into the right direction how this can be achieved
with nitrogen?

Jesse Gumm

unread,
Nov 18, 2011, 12:14:09 PM11/18/11
to nitro...@googlegroups.com
Hello Karo,

This is something that I've been working on and pondering over, or at
least something similar: tracking the upload progress, and as the two
requirements are similar, they should be able to happen together.

But with the current version of Nitrogen and SimpleBridge, it doesn't
currently support streaming. You might have some luck currently by
tapping directly into one of the webservers directly, like making a
Yaws module that gets handled directly by Yaws.

-Jesse

> --
> You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
> To post to this group, send email to nitro...@googlegroups.com.
> To unsubscribe from this group, send email to nitrogenweb...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nitrogenweb?hl=en.
>
>

--
Jesse Gumm
Sigma Star Systems
414.940.4866
gu...@sigma-star.com
http://www.sigma-star.com

Max Lapshin

unread,
Nov 18, 2011, 12:39:50 PM11/18/11
to nitro...@googlegroups.com
You should switch to HTML5 uploading mechanism, that will send you
upload progress events.

But we still need some ability to upload BIG files

Jesse Gumm

unread,
Nov 18, 2011, 12:46:51 PM11/18/11
to nitro...@googlegroups.com
Yeah, that's what I've been doing, at least client side. I've got it
working mostly correctly in Chrome, but in Firefox, it's not working
properly yet (and does IE9 even support the file API? IIRC, it
doesn't, but I'm not sure). I haven't tinkered with it for a couple
of weeks now, but I intend on finish it soon.

As for uploading big files, I've got a quick fix for Mochiweb's
simpe-bridge that overrides the default 1MB limit:

https://github.com/choptastic/simple_bridge/commit/a407b2a6ece9a7a764ce1e5665e80fd216609261

-Jesse

Reply all
Reply to author
Forward
0 new messages