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.
