浏览代码

transloadit: Only use socket.io's WebSocket transport. (#1029)

There is not much benefit to this (except saving a few HTTP requests)
but if we do this we'll see if anyone's firewalls are blocking WS or
something. Then one day in the future we can switch to plain WebSockets
instead of socket.io to shed 20KB once the Transloadit backend supports
it.
Renée Kooi 6 年之前
父节点
当前提交
eb0c681455
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      packages/@uppy/transloadit/src/Assembly.js

+ 1 - 0
packages/@uppy/transloadit/src/Assembly.js

@@ -66,6 +66,7 @@ class TransloaditAssembly extends Emitter {
   _connectSocket () {
     const parsed = parseUrl(this.status.websocket_url)
     const socket = io().connect(parsed.origin, {
+      transports: ['websocket'],
       path: parsed.pathname
     })