App crashes after uploading data to server few times

138
June 17, 2019, at 09:20 AM

I know this is kind of confusing title but this is real. I have website running on local machine and when i upload data to server and log response(generated with uploaded data) a few times (7-8) it crashes (but before that, data is uploaded successfully)! it is not doing anything and when i disconnect from server some errors are added in console but i can not see what causes them because they are server side errors.

this is code which uploads data to server (Client side)

this is where upload data is taken and inserted into DB (Server side)

I really need help with this, you can try it on your machine too and see that it is really confusing.

Answer 1

Replace file append line

data.append(`image[${i}]`, this.fileRef.current.files[i]);
READ ALSO
How to use readline in NodeJs on an event (wait stream close)

How to use readline in NodeJs on an event (wait stream close)

I'm creating a bot that when it receives a message begins to read a text file and responds to the message with the contents of the file

92
Delete properties from object that are not in a class

Delete properties from object that are not in a class

I'm using adonisjs, and am trying to sanitize a post request on the serverThe data I get back has extra properties that are not mapped to the table/model so it is erroring when I try to save

105
How to compare array mongodb query

How to compare array mongodb query

I am currently building a cart system on my mongodb ecommerce appI need help on how to query and compare array

130
openlitespeed nodejs /cgi-sys/defaultwebpage.cgi

openlitespeed nodejs /cgi-sys/defaultwebpage.cgi

I am new to using digitalocean, however i have set up a droplet using the openlitespeed nodejs in the marketplaceI added A record in my dns to point the sub domain dev

148