NodeJS Web App File Upload Chops Off Beginning Of File

前端 未结 2 1300
谎友^
谎友^ 2021-02-10 15:02

I\'m working on a project in NodeJS which involves file upload. The upload is done on the client side with the code:

$(\'#file-upload\').bind(\'change focus clic         


        
相关标签:
2条回答
  • 2021-02-10 15:56

    I figured it out. There was so much logic between my route being defined and the actual file upload code running that it wasn't ready listening for the file.

    0 讨论(0)
  • 2021-02-10 16:02

    I am having this exact same problem. It bothers me that having too much logic between the request and the on('data') event is the problem. I"m testing with a local server, and the amount of logic between the start of the request and registering the on data event is negligible. But the fact that I don't need to cross the internet to do my upload is making this problem that much worse? Are you still experiencing this issue?

    0 讨论(0)
提交回复
热议问题