|
|
@@ -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';
|