开发者

Solution needed for outputting status of processed files with MVC 3

开发者 https://www.devze.com 2023-04-08 11:46 出处:网络
I have to functions for handling processing of files in a director开发者_如何学Pythony. One function reads and counts the files in the directory and foreach file it calls a function that does some ac

I have to functions for handling processing of files in a director开发者_如何学Pythony.

One function reads and counts the files in the directory and foreach file it calls a function that does some action on that file.

What i need is how to update a DIV tag everytime a file is processed. The files are done in sync and is startet by calling the first function.

Right now i return a partialview, but it first return when alle the files are done. As there can be up to 1000 files, i would like to give the user somekind of progress information.

Kind regards \T


Here is one example of Copying file file with a progress status.. You can modify this as per your requirement. If you wish to show the progress you can use ajax or JSON with a jQuery timer which requests number of files of destination folder.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号