Skip to content

Commit

Permalink
attempt to fix sse
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Richter <crichter@owncloud.com>
  • Loading branch information
dragonchaser committed Nov 18, 2024
1 parent 4ce61d4 commit 7fec957
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion internal/http/services/appprovider/appprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down

0 comments on commit 7fec957

Please sign in to comment.