project_mern_memories
project_mern_memories copied to clipboard
base64 decoding
First and foremost, amazing project! Thank you so much for showing this MERN project as it has helped me so much with my understanding as a student!
On the server side when I get the callback for the uploaded images base64 gives an extremely large string per image that at times (unless I don't touch vscode) causes a crash if there is a few pictures uploaded and I refresh the page. Is there anyway to shorten it within the fileBase component to make the string decoded so it's not so long? I was looking at the documentation for it and it seems to need an "onDone={this.getFile.bind(this)} " to maybe shorten the string within the <FileBase ........ /> on Form.js? but I cannot for the life of me figure out how to get it to work. Again, thank you so much for this I subbed to your channel and look forward to more upload from you!
Just remove " console.log(postMessages); " from server/controllers/posts.js
I found that. I was wondering if there was a way to make the string smaller (or encoded) through base 64. Thank you for the reply I appreciate it.
The string is the image's representation in base 64, actually. I also posted very big images and my log became glitchy, too. If you want to see how many posts you are finding, you can change the console.log(postMessages) to (postMessages.length).
Awesome! thank you I will give that a try. When I finished the project i ended up commenting out the console.log so it would function for demonstration without the lag or glitching. Thank you for the reply it is appreciated.