Fares 10 miesięcy temu
rodzic
commit
e195ac1ab2
1 zmienionych plików z 11 dodań i 0 usunięć
  1. 11 0
      lib/handlers/upload_handler.dart

+ 11 - 0
lib/handlers/upload_handler.dart

@@ -89,6 +89,17 @@ Future<Response> handleFileUpload(Request request) async {
               // Continue execution even if archive upload fails
               // Continue execution even if archive upload fails
             }
             }
 
 
+            // No need to subscribe to channel
+            final channel = supabase.channel('csvhichstorage');
+            final res = await channel.sendBroadcastMessage(
+              event: "upload",
+              payload: {
+                "filename": filename,
+                "updated_at": now,
+              },
+            );
+            print("   realtime response: $res");
+
             await processCsvData(tempFile, supabase);
             await processCsvData(tempFile, supabase);
 
 
             //add filename ta list
             //add filename ta list