Steps to reproduce
- Run Starcounter Images app (latest develop)
- Go to `localhost:8080/Images
- Try to upload new image
Expected result
Image is uploaded successfully and websocket is closed
Actual result
Image is uploaded successfully (almost always) but websocket is never closed
Screenshot

I've tried to debug and found one issue, but I'm not sure if it will help:
This condition: https://github.com/Starcounter/starcounter-upload/blob/master/starcounter-upload.html#L224 is always false. The reason is that evt.data is a string, not a JSON object. evt.data should be parsed first.
Even without it onclose is always called, so I'm not sure if it will help with this issue.
cc @miyconst @warpech
Steps to reproduce
Expected result
Image is uploaded successfully and websocket is closed
Actual result
Image is uploaded successfully (almost always) but websocket is never closed
Screenshot
I've tried to debug and found one issue, but I'm not sure if it will help:
This condition: https://github.com/Starcounter/starcounter-upload/blob/master/starcounter-upload.html#L224 is always false. The reason is that
evt.datais a string, not a JSON object.evt.datashould be parsed first.Even without it
oncloseis always called, so I'm not sure if it will help with this issue.cc @miyconst @warpech