File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public function handle(): void
46
46
WHERE project.id = ?
47
47
' , [$ project ->id ])[0 ]->s ?? -1 );
48
48
49
- if ($ total_size / ( 1024 * 1024 * 1024 ) > $ project ->uploadquota ) {
49
+ if ($ total_size > $ project ->uploadquota ) {
50
50
// We're over the limit, so delete references to files from oldest to newest until we're
51
51
// under the limit. We're probably not over the limit by very much, so we load in relatively
52
52
// small chunks to minimize the amount of data being loaded.
@@ -58,7 +58,7 @@ public function handle(): void
58
58
$ uploaded_files_to_check = $ uploaded_files_to_check ->merge ($ build ->uploadedFiles ()->pluck ('id ' ));
59
59
$ build ->uploadedFiles ()->detach ();
60
60
61
- if ($ total_size / ( 1024 * 1024 * 1024 ) <= $ project ->uploadquota ) {
61
+ if ($ total_size <= $ project ->uploadquota ) {
62
62
// Stop the build chunking.
63
63
return false ;
64
64
}
Original file line number Diff line number Diff line change 41
41
* @property int $displaylabels
42
42
* @property int $autoremovetimeframe
43
43
* @property int $autoremovemaxbuilds
44
- * @property int $uploadquota Maximum sum of uploaded file sizes in GiB
44
+ * @property int $uploadquota Maximum sum of uploaded file sizes ( in bytes)
45
45
* @property int $showcoveragecode
46
46
* @property int $sharelabelfilters
47
47
* @property int $authenticatesubmissions
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public function testProjectNoUploadedFiles(): void
56
56
57
57
public function testUploadedFilesBelowLimit (): void
58
58
{
59
- $ this ->project ->uploadquota = 2 ;
59
+ $ this ->project ->uploadquota = 2147483648 ;
60
60
$ this ->project ->save ();
61
61
62
62
$ hash = sha1_file (__FILE__ );
@@ -94,7 +94,7 @@ public function testUploadedFilesBelowLimit(): void
94
94
95
95
public function testUploadedFilesAboveLimit (): void
96
96
{
97
- $ this ->project ->uploadquota = 1 ;
97
+ $ this ->project ->uploadquota = 1073741824 ;
98
98
$ this ->project ->save ();
99
99
100
100
$ hash = sha1_file (__FILE__ );
You can’t perform that action at this time.
0 commit comments