I deal with security cameras and a lot of them stream audio out via post
using a multipart/x-mixed-replace mime header.
It is the servers responsibility in these cases to take the payloads out of
each section, the parts marked with --MyBoundry.

AFAIK This mime type was originaly created for the other direction. For
browsers to display MJPEG by letting them just keep replacing the image.
But has been adopted to stream to a server.
This would mean the server must work on each chunk not the whole post. So I
would guess there would be two callbacks. One at post start and one for
each myBoundry section.


On Fri, Jan 17, 2014 at 6:23 AM, Sergey Lyubka <[email protected]> wrote:

> On Fri, Jan 17, 2014 at 6:13 AM, V Phani <[email protected]> wrote:
>
>> Thanks for your response.
>>
>> Is there any way to avoid calling realloc() repeatedly to get more
>> memory. when I call mg_upload, then only it should write data into a
>> directory specified in mg_upload.
>>
>
> Currently, there is no way to have streaming POST data. One possible
> solution to that is to command mongoose to save POST data into a
> temporary file, then when all POST data is saved, mongoose will call a
> handler.
> A temporary file would have a non-interpreted, raw POST data.
>
> Note that multipart POST data might have multiple files, and non-files
> too. How
> would you like to have it presented? Right now, there is a function
> mg_parse_multipart()
> but it works on memory buffer. Usage example is at
> https://github.com/cesanta/mongoose/blob/master/examples/upload.c
> Take a look at that function, would you use similar function that works on
> a file stream?
>
> --
> You received this message because you are subscribed to the Google Groups
> "mongoose-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/mongoose-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to