« first day (3312 days earlier)      last day (1643 days later) » 

11:11 AM
Anybody here?
 
11:25 AM
@Mr.President Ain't nobody but us chickens.
 
11:40 AM
@Mr.President And ovis aries.
 
12:39 PM
them chickens still alive?
 
@RobyRodriguez Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
1:34 PM
stackoverflow.com/q/58777457/11459517 I have edited the code as @RachelDockter, @JBis and @JamesBot said. But it still not working. I stacked in this code for last 3 days.
 
 
2 hours later…
3:19 PM
@MadaraUchiha, @Sheepy: Thank you for replying :)
 
 
4 hours later…
6:52 PM
hi JamesBot
not very keen on plesantries that Bot @JamesBot
 
7:32 PM
hello, i got a quick question about node.js
you know that method called readFileSync()
does it always return a string?
or if you put the encoding option as "json" it returns a json instead?
 
8:10 PM
@JDCH No
@JDCH That's not a thing.
By default, if you don't pass an encoding, it returns a Buffer object.
If you put an encoding, it will tell it how to encode that buffer into a string, and so you get a string.
If you're reading a JSON file and want to treat it like a JavaScript object, just use require('./file.json')
 
8:28 PM
@MadaraUchiha Does this work dynamically? If you change a file after you started the node program and require it later will it reflect the changes?
 
@JBis Haven't actually checked.
 
I think due to caching it would not change. But I could be wrong.
> Modules are cached after the first time they are loaded. This means (among other things) that every call to require('foo') will get exactly the same object returned, if it would resolve to the same file.
 
8:50 PM
@MadaraUchiha what i did at the end was something like this JSON.parse(readFileSynch(".public/file.json", "utf8"));
and thanks, now i know it always returns a string
or a buffer if no encoding is given
 
user8331511
9:08 PM
Hey all, I have the following Q wondering if anyone could take a look as I'm banging my head against the wall why my data isn't saving stackoverflow.com/questions/58791767/…
 
@nightcode Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
user8331511
Postman requests work, and the output is displaying as it should as I have shown in the question. but in terms of sending the data through a visual form, that's a no go currently and I have no clue on how to fix it.
 
user8331511
Here's the Q again, just read the rules regarding posting the Q by itself
 
user8331511
0
Q: Multiple image upload does not lead to an array

nightcodeI have the following field where a user can upload images <div className='flex flex-wrap mb-4'> <label htmlFor='images'>images:</label> <input type='file' multiple name='images' value={images} accept='image/*' onChange={this.onImagesChange.bind(this)} ></input> </div> a...

 

« first day (3312 days earlier)      last day (1643 days later) »