From 7fec95703c04fa148f4e45f0c37096f9945724b7 Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Mon, 18 Nov 2024 17:31:21 +0100 Subject: [PATCH] attempt to fix sse Signed-off-by: Christian Richter --- internal/http/services/appprovider/appprovider.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/internal/http/services/appprovider/appprovider.go b/internal/http/services/appprovider/appprovider.go index 14761c25791..8f84a033c7b 100644 --- a/internal/http/services/appprovider/appprovider.go +++ b/internal/http/services/appprovider/appprovider.go @@ -230,6 +230,16 @@ func (s *svc) handleNew(w http.ResponseWriter, r *http.Request) { return } + touchfileReq := &provider.TouchFileRequest{ + Ref: fileRef, + } + + _, err = client.TouchFile(ctx, touchfileReq) + if err != nil { + writeError(w, r, appErrorServerError, "error sending a grpc touchfile request", err) + return + } + // Create empty file via storageprovider createReq := &provider.InitiateFileUploadRequest{ Ref: fileRef, @@ -244,7 +254,7 @@ func (s *svc) handleNew(w http.ResponseWriter, r *http.Request) { } // having a client.CreateFile() function would come in handy here... - + // TODO: this is IMHO the culprit why the event is not triggered createRes, err := client.InitiateFileUpload(ctx, createReq) if err != nil { writeError(w, r, appErrorServerError, "error calling InitiateFileUpload", err)