File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010use App \Models \Collection ;
1111use App \Models \File ;
1212use App \Models \Vector ;
13+ use App \Notifications \Notification ;
1314use App \Rules \IsValidCollectionName ;
1415use Illuminate \Support \Facades \Log ;
1516use Illuminate \Support \Facades \Storage ;
@@ -47,6 +48,8 @@ protected function handle2($event)
4748 throw new \Exception ("Invalid file id : {$ event ->fileId }" );
4849 }
4950
51+ $ event ->user ->notify (new Notification (__ ("Import of document :document started. " , ['document ' => $ file ->name ])));
52+
5053 // webm to mp3
5154 if ($ file ->mime_type === 'audio/webm ' ) {
5255
@@ -396,8 +399,16 @@ protected function handle2($event)
396399 $ file ->is_embedded = true ;
397400 $ file ->save ();
398401 }
402+
403+ $ event ->user ->notify (new Notification (__ ("Import of document :document finished successfully. " , ['document ' => $ file ->name ])));
404+
399405 } catch (\Exception $ exception ) {
406+
400407 Log::error ($ exception ->getMessage ());
408+
409+ if (isset ($ file )) {
410+ $ event ->user ->notify (new Notification (__ ("Import of document :document failed: :error " , ['document ' => $ file ->name , 'error ' => $ exception ->getMessage ()])));
411+ }
401412 }
402413 }
403414
Original file line number Diff line number Diff line change 44 "Import of table :table started." : " L'importation de la table :table a commencé." ,
55 "Import of table :table finished successfully." : " L'importation de la table :table s'est terminée avec succès." ,
66 "Import of table :table failed: :error" : " L'importation de la table :table a échoué : :error" ,
7+ "Import of document :document started." : " L'importation du document :document a commencé." ,
8+ "Import of document :document finished successfully." : " L'importation du document :document s'est terminée avec succès." ,
9+ "Import of document :document failed: :error" : " L'importation du document :document a échoué : :error" ,
710 "2.2 What are the credentials for your AWS S3 Bucket?" : " 2.2 Quels sont les identifiants de votre bucket S3 AWS ?" ,
811 "2.2 What are the credentials for your Azure Blob Storage?" : " 2.2 Quels sont les identifiants de votre Blob Storage Azure ?" ,
912 "3. Which table would you like to import?" : " 3. Quelle table souhaitez-vous importer ?" ,
You can’t perform that action at this time.
0 commit comments