Fares 10 months ago
parent
commit
fbb5a10cad
1 changed files with 2 additions and 12 deletions
  1. 2 12
      lib/handlers/upload_handler.dart

+ 2 - 12
lib/handlers/upload_handler.dart

@@ -23,7 +23,8 @@ Future<Response> handleFileUpload(Request request) async {
 
   // Initialize Supabase client with the bearer token
   final supabase = SupabaseClient(
-    'http://baas.fares.cyou:8000',
+    // 'http://baas.fares.cyou:8000',
+    'http://kong:8000',
     token,
   );
 
@@ -72,17 +73,6 @@ Future<Response> handleFileUpload(Request request) async {
             // final timestamp ='${nowdt.year}${nowdt.month.toString().padLeft(2, '0')}${nowdt.day.toString().padLeft(2, '0')}_${nowdt.hour.toString().padLeft(2, '0')}${nowdt.minute.toString().padLeft(2, '0')}';
             final timestamp = nowdt.millisecondsSinceEpoch.toString();
 
-            // No need to subscribe to channel
-            final res =
-                await supabase.channel('csvhichstorage').sendBroadcastMessage(
-              event: "upload",
-              payload: {
-                "filename": filename,
-                "updated_at": now,
-              },
-            );
-            print("   realtime response: $res");
-
             //upload file to storage archive bucket
             try {
               final archiveFilename = 'upload/${timestamp}_$filename';