Fixed a bug in which Luminotes Desktop file attachment did not always work due to incorrect upload progress reporting.
This commit is contained in:
parent
fd76ef3fa4
commit
949778e702
|
@ -681,7 +681,9 @@ class Files( object ):
|
|||
|
||||
rate_plan = self.__users.rate_plan( user.rate_plan )
|
||||
|
||||
if user.storage_bytes + uploading_file.content_length > rate_plan.get( u"storage_quota_bytes", 0 ) * SOFT_QUOTA_FACTOR:
|
||||
storage_quota_bytes = rate_plan.get( u"storage_quota_bytes" )
|
||||
if storage_quota_bytes and \
|
||||
user.storage_bytes + uploading_file.content_length > storage_quota_bytes * SOFT_QUOTA_FACTOR:
|
||||
return stream_quota_error()
|
||||
|
||||
return stream_progress( uploading_file, filename, fraction_reported )
|
||||
|
|
|
@ -1315,6 +1315,10 @@ class Test_files( Test_controller ):
|
|||
|
||||
self.assert_streaming_error( result, u"quota" )
|
||||
|
||||
def test_progress_no_quota( self ):
|
||||
self.settings[ u"global" ][ u"luminotes.rate_plans" ][ 1 ][ u"storage_quota_bytes" ] = None
|
||||
self.test_progress()
|
||||
|
||||
def test_stats( self ):
|
||||
self.login()
|
||||
orig_storage_bytes = self.user.storage_bytes
|
||||
|
|
Reference in New Issue