@@ -243,18 +243,15 @@ private function uploadValidator($file)
243243 $ type_key = $ this ->helper ->currentLfmType ();
244244
245245 if (config ('lfm.should_validate_mime ' , false )) {
246- $ mine_config = 'lfm.valid_ ' . $ type_key . '_mimetypes ' ;
247- $ valid_mimetypes = config ($ mine_config , []);
248- if (false === in_array ($ mimetype , $ valid_mimetypes )) {
246+ if (false === in_array ($ mimetype , $ this ->helper ->availableMimeTypes ())) {
249247 return $ this ->error ('mime ' ) . $ mimetype ;
250248 }
251249 }
252250
253251 if (config ('lfm.should_validate_size ' , false )) {
254- $ max_size = config ('lfm.max_ ' . $ type_key . '_size ' , 0 );
255252 // size to kb unit is needed
256253 $ file_size = $ file ->getSize () / 1000 ;
257- if ($ file_size > $ max_size ) {
254+ if ($ file_size > $ this -> helper -> maxUploadSize () ) {
258255 return $ this ->error ('size ' ) . $ file_size ;
259256 }
260257 }
@@ -294,8 +291,6 @@ public function makeThumbnail($filename)
294291 // create folder for thumbnails
295292 $ this ->setName (null )->thumb (true )->createFolder ();
296293
297- \Log::info ($ this ->thumb (false )->setName ($ filename )->path ('absolute ' ));
298-
299294 // generate cropped thumbnail
300295 Image::make ($ this ->thumb (false )->setName ($ filename )->path ('absolute ' ))
301296 ->fit (config ('lfm.thumb_img_width ' , 200 ), config ('lfm.thumb_img_height ' , 200 ))
0 commit comments