jesalg / wami-recorder

Automatically exported from code.google.com/p/wami-recorder
0 stars 0 forks source link

Request: How-to do multiple POSTs for large files in WAMI Recorder #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Since my users will be recording quiet lengthy files, doing multiple HTTP posts 
as mentioned in the FAQ would really be useful.
Does someone have sample code for that or at least some pointers (php for the 
server code would be fine)?

Original issue reported on code.google.com by maye...@gmail.com on 20 Apr 2012 at 6:38

GoogleCodeExporter commented 9 years ago
Here's a chunk aggregator in Java http://pastebin.com/vy0iVawj.   It might be 
much more complicated than what you need, since this actually maintains a 
stream rather than creating a file.  The stream can be written to a file, of 
course, but really you just need to put the chunks in order, which could be 
done in memory rather than on-the-fly like this code.  Here's a function that 
is called for each chunk... for the first chunk it returns a stream, for the 
remaining chunks it just writes them to the "pipe": http://pastebin.com/tyt9e1aJ

Again, this might be overkill for what you need.  And it's not PHP.  But it's 
the idea.

Original comment by mcgrawian@gmail.com on 20 Apr 2012 at 6:50

GoogleCodeExporter commented 9 years ago

Original comment by mcgrawian@gmail.com on 8 May 2012 at 11:28