Get token before upload
Merge pull request #1 from xtang/get-token-before-upload

Get token before upload
Use promise for upload
Merge pull request #2 from xtang/get-token-before-upload

Use promise for upload
Fixed a mistake
Merge pull request #3 from xtang/get-token-before-upload

Fixed a mistake
Fixed token reset issue
Merge pull request #4 from xtang/get-token-before-upload

Fixed token reset issue