Re: [Cppcms-users] upload progress
Brought to you by:
artyom-beilis
From: Frank E. <fra...@an...> - 2010-07-18 11:27:46
|
i suppose the callbacks would be a good thing. it should include - a possibility to cancel a transfer before it has even started (i guess this is what you mean with preupload validation) - an option to let the file be received by cppcms (cppcms handles storing the file just like it does now) optionally with a callback whcih tells the applicationt he amount of received bytes. - an option to pass the data while receiving directly to an application callback so the application can save the data to the target itself (no duplicate data holding since no temp files or temp memory blocks are involved in receiving the file) it should be simple and simple to use. since i now need this functionality i'll try to hack something in the the current library version, but it won't be a beautiful solution and i'd like to replace it as soosn as available with a version from upstream. frank Am 18.07.2010 11:33, schrieb Artyom: > Hello, > > Currently, all upload is done without involvement of the user application, > the user application is called only after processing all POST data. > But better upload handling should be implemented in RC1, as part of better > upload validation. > > It is in task list, see: > > > http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x_tasks#Implement+Pre-Upload+file+validation+-+Mrc. > > > Generally as part of API I think it would be possible to add some upload hooks > so the > application can have better control over upload process and so it would be able > to do anything, > it wants. > > Additional option may be give to give an application full control over > processing POST data. > So in some cases, application could be "called" before actual POST data is > transferred. > > In such case would be able to handle all notification as in regular comet > application. > > But this requires work and API design. So if you can propose some suggestions > and requirements for > such API, they may be actually implemented in CppCMS :-) > > Best, > Artyom > > P.S.: Isn't java-script has an ability to do such things on client side? > > >> >> hi, >> >> i need (must have) the possibility to know how much data of an ongoing >> post to the cppcms application has been transmitted. i need to be able >> to give somekind of upload progress feedback. when i'm not mistaken this >> is not possible using cpcms - is there any workaround for that? or is it >> possible to implement something like that? >> >> maybe somekind of instance which can be queried for in progress post >> transfers using some kind of i which the js application also uses to >> transmit the file in the post and returns the number of bytes >> transmitted and if available the full size to be transmitted? >> >> any ideas? >> >> frank. >> >> -- >> Dipl.-Ing. (FH) Frank Enderle >> >> anamica UG (haftungsbeschränkt) >> Beinsteinerstr. 6 >> 71334 Waiblingen >> >> Telefon: +49 151 14981091 >> Telefax: +49 7151 1335770 >> E-Mail: fra...@an... >> Internet: www.anamica.de >> >> Handelsregister: AG Stuttgart HRB 732357 >> Geschäftsführer: Yvonne Holzwarth, Frank Enderle >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Sprint >> What will you do first with EVO, the first 4G phone? >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users -- Dipl.-Ing. (FH) Frank Enderle anamica UG (haftungsbeschränkt) Beinsteinerstr. 6 71334 Waiblingen Telefon: +49 151 14981091 Telefax: +49 7151 1335770 E-Mail: fra...@an... Internet: www.anamica.de Handelsregister: AG Stuttgart HRB 732357 Geschäftsführer: Yvonne Holzwarth, Frank Enderle |