Run observe after http post using session$registerDataObj()

shiny

#1

I’m POSTing a sound file the client records using an http POST method with session$registerDataObj() as demonstrated here. I’d like to analyze the sound file once it is saved to the server but found that telling Shiny to wait until the file is uploaded is tricky.

Since it appears you cannot change reactive values and trigger dependencies to be recalculated (flushed) inside session$registerDataObj(), which could trigger an observeEvent({}), it seemed I had to try some unprincipled ways of getting shiny server to wait until the file is there. For example, using the “wait()” function. Which doesn’t work because it seems to suspend all operations.

Is there a principled way to trigger the server, through an observe() call, after a file has been uploaded through HTTP POST?