diff --git a/controller/Files.py b/controller/Files.py index 83b8d50..25a7f7c 100644 --- a/controller/Files.py +++ b/controller/Files.py @@ -13,6 +13,7 @@ from model.File import File from view.Upload_page import Upload_page from view.Blank_page import Blank_page from view.Json import Json +from view.Progress_bar import stream_progress class Access_error( Exception ): @@ -392,81 +393,7 @@ class Files( object ): fraction_reported = 1.0 break - # TODO: maybe move this to the view/ directory - def report( uploading_file, fraction_reported ): - """ - Stream a progress meter as it uploads. - """ - progress_bytes = 0 - progress_width_em = 20 - tick_increment = 0.01 - progress_bar = u'' % \ - ( progress_width_em * tick_increment ) - - yield \ - u""" - -
- - - - - - """ - - base_filename = filename.split( u"/" )[ -1 ].split( u"\\" )[ -1 ] - yield \ - u""" -
- %s
- |
- - | - | - | - |