This was a great help to make my own React component to upload very large files (4+ gb) in chunks instead of one big file.
@CodingWithDawid2 жыл бұрын
For sure. I think browsers would struggle to upload this much in one chunk. And there would be some limitations on the backend server too
@StereoWorld2 жыл бұрын
Big fan of your videos sir. But i wonder why haven't you gained so popularity like others do, makes me feel sad to see a talented web developer with such less recognition.
@CodingWithDawid2 жыл бұрын
I guess it will come with time 🤷🏻♂️ Until then I want to thank you for your kind words. It motivates me to stay consistent and to create more videos for people like you. I hope you learned something useful from my videos that will help you to build something awesome in the nearest future! Take care and keep coding!
@adityadubey24883 жыл бұрын
Always making sure to like and comment.
@CodingWithDawid3 жыл бұрын
Thank you! 🙂
@promods962 жыл бұрын
Hi Dawid, Thank you so much for the content. One small doubt, after slicing the file any reason why we are using readAsDataURL? Can't we just directly send the sliced blob ?
@turki85422 жыл бұрын
lets say i want to have my back-end with Django. how can i do it?. Thanks
@turki85422 жыл бұрын
thank you so much man for this video but i want to know what if i want to send this info to a database and from the database back to the ui how can i take the bytes from the database and convert it to display it on the screen? thanks.
@CodingWithDawid2 жыл бұрын
You shouldnt put files into a database. Use s3 or something similar for file storage and then store s3 links in your database
@ropen812 жыл бұрын
Great content! Is there any reason why you chose to send the data using readAsDataURL instead of readAsArrayBuffer?
@CodingWithDawid2 жыл бұрын
I like to send encrypted blobs/binaries to see whats its actually sent in more human readable format
@ropen812 жыл бұрын
@@CodingWithDawid Thanks!
@tahaahmadi7446 Жыл бұрын
Hi Dawid, at first thanks you so much for sharing your skills with us, for this code, after uploading whenever I want to stream it It doesnt work, also file size after upload is not same the orginal file
@araxyso3 жыл бұрын
Can you try to make it so it’s compatible with iPhones like where you click the box it’ll become a button then it’ll show like options to use your iPhones file manager or browser some where?
@CodingWithDawid3 жыл бұрын
You can just put a instead of the drop area or inside the drop area. The events are most likely the same for the inout as they are for the dropzone
@araxyso3 жыл бұрын
@@CodingWithDawid ah alright thanks
@aashishpaudyal53063 жыл бұрын
Is it gurenteed that the file chunks are received in order? If it doesnot then file won't be currupted ?
@CodingWithDawid3 жыл бұрын
Yes. The next chunk/part will not start uploading before the previous one is not succesfully uploaded
@RogerioTadim2 жыл бұрын
owesome!
@korogomo45832 жыл бұрын
good job man
@CodingWithDawid2 жыл бұрын
Thank you!
@david-tracy3 жыл бұрын
Great. Do u suggest uploading a zip file this way? ... or is this approach more for live streaming types of applications..? The zip file has multiple files in it (in case that info helps to determine an answer). The zip file that contains source code for a medium/small sized application. I want to upload the zip to my server / storage.
@CodingWithDawid3 жыл бұрын
Yes. It should work with zip files too! 🙂
@david-tracy3 жыл бұрын
@@CodingWithDawid thank u man. I appreciate it!
@chawza84022 жыл бұрын
on iterating the chunks, why do you use useEffect? not a simple loop? What I see it's really complicated that you track the chunk index using states and useEffect where you use every where. I'm still trying to understand your code and it seems there is there is something obvious that I miss. What in my mind is that, in the client side, we can iterate the sliced blob inside the readAndUploadChunks() which inside use axios that sends the chunk. Although I learn alot on the backend part where you ssave each chunk temporarily on the disk and rename it afterward, but the client side is more complicated that it seems
@CodingWithDawid2 жыл бұрын
what useEffect do you mean exactly? I mainly use state/useEffect so the app re-renders and shows the progress. i guess that a loop would for fine as well, but you would just need to update state to inform the app about the progress
@chawza84022 жыл бұрын
@@CodingWithDawid thats make sense. Maybe when I watch the video I got confused by many states (states that track files). Thanks for the video. I have implement the similar code as your but fetching inside the loop and it works well.
@sundeeepu Жыл бұрын
@@chawza8402 Could you please share the github link of that code you have done with loops. Sir!
@uuach7313 жыл бұрын
Does anyone know what theme is similar to this in VScode?
@CodingWithDawid3 жыл бұрын
The name of the theme is "One Dark Pro Italic Vivid" so maybe this one will work: marketplace.visualstudio.com/items?itemName=jsjlewis96.one-dark-pro-italic-vivid
@crazyshala45712 жыл бұрын
Really good content man really appreciate can you make a video on streaming video from node to react site
@CodingWithDawid2 жыл бұрын
Really interesting idea! I will look into it. Thanks!
@devindissanayaka81163 жыл бұрын
Im lookimg for a way to download big files from url as chunks and upload them to google drive in heroku like mirror telegram bots. can you make a tutorial how to do that please 🙂
@phamngocson83663 жыл бұрын
I have this problem, I upload about 50 files and one file is 3.5 MB. But when I uploaded all of file, Chrome is crash. Can you help me solve this issue?
@CodingWithDawid3 жыл бұрын
Are all other files also around 3.5MB in size? Do you get any error in you browser console?
@phamngocson83663 жыл бұрын
@@CodingWithDawid Yes. when I uploaded new data , chrome memory did not clear and memory grow. I want clear memory chrome when I upload new data.
@mohamedyoussef8835 Жыл бұрын
Awesome video ++++++++++++++ 🙂
@CodingWithDawid Жыл бұрын
thank you!
@log-o2d3 жыл бұрын
can i get source code? i have got some error when i upload files
@CodingWithDawid3 жыл бұрын
Here: github.com/dejwid/mern-chunked-upload
@log-o2d3 жыл бұрын
@@CodingWithDawid thank you
@haiderjaafer81643 жыл бұрын
Great work keep going forward… is it working on pdf files
@CodingWithDawid3 жыл бұрын
Thank you! Yes it should work with all file types
@haiderjaafer81643 жыл бұрын
@@CodingWithDawid How to save files into MySQL and browse that file and show it
@guruswamihiremath27433 жыл бұрын
Thank you
@CodingWithDawid3 жыл бұрын
Thank YOU for watching! 🙂
@jacekjakubiak79743 жыл бұрын
You write quite fast, and it is really enjoyable to watch you, but you could separate http logic and make it cleaner.
@CodingWithDawid3 жыл бұрын
Thanks! You mean to split the backend functionality into smaller chunks?