File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 11en :
22 SilverStripe\ForagerBifrost\Extensions\FileFormExtension :
33 FILE_LIMIT_MESSAGE : " Document search extraction limit is {limit}"
4- LARGE_FILE_WARNING : " File size is {size} which exceeds the search extraction limit of {limit}"
4+ LARGE_FILE_WARNING : " Text contained within this {size} file cannot be indexed for search. The file size limit for text extraction is {limit}. "
Original file line number Diff line number Diff line change @@ -78,7 +78,8 @@ private function createLargeFileWarning(File $file): ?LiteralField
7878 ['class ' => 'alert alert-warning ' ],
7979 _t (
8080 self ::class . '.LARGE_FILE_WARNING ' ,
81- 'File size is {size} which exceeds the search extraction limit of {limit} ' ,
81+ 'Text contained within this {size} file cannot be indexed for search. '
82+ . 'The file size limit for text extraction is {limit}. ' ,
8283 [
8384 'size ' => $ file ->getSize (),
8485 'limit ' => SearchFile::sizeLimit (),
Original file line number Diff line number Diff line change @@ -139,7 +139,8 @@ public function testCreateLargeFileWarning(): void
139139
140140 $ this ->assertInstanceOf (LiteralField::class, $ field );
141141 $ this ->assertEquals (
142- '<p class="alert alert-warning">File size is 16 MB which exceeds the search extraction limit of 15 MB</p> ' ,
142+ '<p class="alert alert-warning">Text contained within this 16 MB file cannot be indexed for search. '
143+ . ' The file size limit for text extraction is 15 MB.</p> ' ,
143144 $ field ->getContent ()
144145 );
145146 }
You can’t perform that action at this time.
0 commit comments