Skip to content
This repository was archived by the owner on Aug 6, 2018. It is now read-only.
This repository was archived by the owner on Aug 6, 2018. It is now read-only.

TypeError: Cannot read property 'substring' of undefined #100

@gooof

Description

@gooof

I've setup uppy-server for image uploading from google drive, dropbox &co, and is working great until the upload.
I choose a file and click on "select", the thumbnails comes correctly up.
But when I click on "Upload files" uppy-server quits with a TypeError.

::ffff:127.0.0.1 - "GET /drive/thumbnail/0B1zj7405adOCQzh0ZUhLYUw5eEk HTTP/1.0" 200 4500 "http://domain/index.php?sid=9bfc99e" "Mozilla/5.0"
::ffff:127.0.0.1 - "OPTIONS /drive/get/0B1zj7405adOCQzh0ZUhLYUw5eEk HTTP/1.0" 200 4 "-" "Mozilla/5.0"
uppy: [debug] debugLog Instantiating uploader.
uppy: [debug] uploader.validator.fail Invalid destination url
uppy: [debug] debugLog Waiting for socket connection before beginning remote download.
/usr/lib/node_modules/uppy-server/lib/server/Uploader.js:74
        return this.token.substring(0, 8);
                          ^

TypeError: Cannot read property 'substring' of undefined
    at Uploader.get shortToken [as shortToken] (/usr/lib/node_modules/uppy-server/lib/server/Uploader.js:74:27)
    at Uploader.onSocketReady (/usr/lib/node_modules/uppy-server/lib/server/Uploader.js:82:30)
    at provider.size (/usr/lib/node_modules/uppy-server/lib/server/controllers/get.js:38:18)
    at stats (/usr/lib/node_modules/uppy-server/lib/server/provider/drive.js:59:13)
    at Request._callback (/usr/lib/node_modules/uppy-server/node_modules/purest/lib/transform.js:73:5)
    at Request.self.callback (/usr/lib/node_modules/uppy-server/node_modules/request/request.js:186:22)
    at Request.emit (events.js:182:13)
    at Request.EventEmitter.emit (domain.js:442:20)
    at Request.<anonymous> (/usr/lib/node_modules/uppy-server/node_modules/request/request.js:1163:10)
    at Request.emit (events.js:182:13)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions