Skip to content

this.userId is not always available onBeforeUpload #207

@oeway

Description

@oeway

I am trying to validate the user in onBeforeUpload:

 onBeforeUpload: function (file) {
    console.log(this.userId);
}

But on the server it outputs 3 lines for a single upload:

I20160830-12:46:55.587(2)? undefined
I20160830-12:46:55.820(2)? LSmRXxxkSs9RrPfN4
I20160830-12:46:55.832(2)? LSmRXxxkSs9RrPfN4

Two questions, one is why it calls three times? second is why the first time this.userId is not defined?
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions