Skip to content

.upload() is not a function? #137

Locked Answered by qgustavor
AliAryanTech asked this question in Q&A
Discussion options

You must be logged in to vote

I'm quite confused on what you're trying to do, I don't know your JavaScript background, but seems you are mistaking how asynchronous JavaScript works.

Do you know how to use Promises? And how about callbacks? If not check some tutorial for those topics first.

storage.ready is a Promise, so seems you're missing an await keyword, but at the same time you defined a callback at the same time, which… is weird. Use one or another. Callbacks is the old pattern, promises is the new one, this library support both because backyards compatibility but I recommend learning and using promises as they avoid some issues that callbacks have (like nesting hell).

Seems you are using Node CJS, it does not s…

Replies: 2 comments 20 replies

Comment options

You must be logged in to vote
3 replies
@AliAryanTech
Comment options

@qgustavor
Comment options

@AliAryanTech
Comment options

Answer selected by AliAryanTech
Comment options

You must be logged in to vote
17 replies
@qgustavor
Comment options

@AliAryanTech
Comment options

@AliAryanTech
Comment options

@qgustavor
Comment options

@AliAryanTech
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #136 on December 29, 2022 16:50.