How to Upload Images with JavaScript ( The Ultimate Guide ) - JavaScript - Part #1

preview_player
Показать описание
How to upload and preview images with JavaScript? This image uploading guide teaches you everything you need to know about uploading images with JavaScript. I broke the process down into three parts.

Part 1: How to upload and preview images on the frontend.
Part 3: How to save the images in a MySQL database / Amazon Web Services (AWS) S3.

Codepen for CSS:

Prefer to read the ultimate JavaScript image uploading guide?

Follow my blog:

Like the intro to my video? Learn how to make one:

Рекомендации по теме
Комментарии
Автор

When you delete a file, maybe you can have the 'delete' button switch to a different colour and say 'update' instead. Regadless, this is awesome. Looking forward to the next videos

RaddyDev
Автор

Awesome Tutorial, Thank you so much.
I noticed that after the "let queuedImagesArray = [], " array you created, the remaining variables such as "savedForm, queuedForm, savedDiv etc." do not have the let, var or const keyword. I want to know if they are also part of the "queuedImageArray" or we can also create variable without using the "let, var or const" keyword.
Thank you

deepestbars
Автор

I keep getting this error, and it doesn`t show any images.. Why it can happen? Arleady wasted hours trying to fix it..
Uncaught TypeError: Failed to execute 'createObjectURL' on 'URL': Overload resolution failed.
at scripts.js:86:34
at Array.forEach (<anonymous>)
at displayImages (scripts.js:84:16)
at HTMLInputElement.<anonymous> (scripts.js:79:3)

beargrill
Автор

It would be great content if you did not type all the code simultaneously. You should type a bunch of code and show us the result of it in the browser. But you are writing all the code at a time and showing us the final result. Which I don't think really helps the beginners.

md.mahidunnobi