---
title: "Discussion on \"10 useful HTML file upload tips for web developers\" | Hashnode"
description: "Discussion on \"10 useful HTML file upload tips for web developers\". Introduction\nThe ability to upload files is a key requirement for many web and mobile applications. From uploading your photo on social media to post your resume on a job portal website, file upload is everywhere.\nAs a web developer, we must know tha..."
url: "https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [10 useful HTML file upload tips for web developers](https://blog.greenroots.info/10-useful-html-file-upload-tips-for-web-developers?utm_source=hashnode&utm_medium=feed)

Introduction The ability to upload files is a key requirement for many web and mobile applications. From uploading your photo on social media to post your resume on a job portal website, file upload is everywhere. As a web developer, we must know tha...

Oct 18, 2020 · 15 min read · blog.greenroots.info  
Updated Feb 2, 2021  
Read the article

-   [#programming](https://hashnode.com/tag/programming)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#html](https://hashnode.com/tag/html)
-   [#html5](https://hashnode.com/tag/html5)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[Tapas Adhikary](https://hashnode.com/@atapas)

@atapas · Bangalore

  
[View profile](https://hashnode.com/@atapas)

Educator @tapaScript | Founder CreoWis & ReactPlay - Writer - YouTuber - Open Source

Co-Founder, @CreoWis | Teacher, @tapaScript | Founder, @ReactPlay | YouTuber | Writer | Human

## Responses 14

Markdown supported · ⌘↵ to post

[Christopher Norris](https://hashnode.com/@afrpar)

[Oct 24, 2022](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/63561024f1b7b0d89235a190)

This is information that is both great and helpful.

[Mayur Kamble](https://hashnode.com/@mayurkamble02)

[Aug 24, 2022](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/6305858b750cde48abba98a2)

very helpful

[Deacon Santiago](https://hashnode.com/@markmokil)

[Jun 28, 2022](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/62bad4633f3c29d732652934)

This article has helped me to How to get full path of uploaded file in html using JavaScript. This website and this [kodlogs.net/234/how-to-get-full-path-of-uploaded-…](https://kodlogs.net/234/how-to-get-full-path-of-uploaded-file-in-html-using-javascript) website came in handy when I think about it. Thanks to the website authorities

[Abhishek Loni](https://hashnode.com/@CodeMonkAbhi)

[Oct 21, 2021](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/617119d60f452c1cd94f6062)

That's Great! Thank you so much and please keep sharing like these contents.

[Gilbert Walker](https://hashnode.com/@Gil-Gamewise)

[Sep 1, 2021](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/612ff8cec21ac123ca378420)

Hey Tapas thanks for sharing!

I'm trying to recreate the very first simple file upload using your code, but getting like 5 console.logs instead of 1??

Am I doing something wrong? ![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1630533821653/DWEeIcyry.png)

The code: const fileUploader = document.getElementById('file-uploader');

```
    fileUploader.addEventListener('change', (event) => {
    const files = event.target.files;
    console.log('files', files);
    });
```

[saptharishi suresh](https://hashnode.com/@Saptha)

[Jun 29, 2021](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/60daffbdf4984338ee7cb2ac)

Thanks for this article. I've a question. How do we monitor file upload progress if we use URL.createObjectURL()

[Tapas Adhikary](https://hashnode.com/@atapas)

[Jun 29, 2021](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/60daffbdf4984338ee7cb2ac#reply-60db1dc7a5a0e338c9f98af5)

Hi [saptharishi suresh](https://hashnode.com/@Saptha), file upload progress 'monitoring' will be difficult to do with `URL.createObjectURL()`.

The `URL.createObjectURL()` is to get the object(image, PDF) URL to render(display) them on DOM. So with progress monitoring(assuming I am uploading multiple image files), I can use the URL.createObjectURL() when the upload of each of the images is done and display them like a thumbnail on the page.

Is that what you are looking for? Did I understand your question correctly?

[Sanvi Merin](https://hashnode.com/@sanvimerin)

[May 19, 2021](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/60a48dd15c1fcb4077364294)

Glad to find this awesome article!

[Tapas Adhikary](https://hashnode.com/@atapas)

[May 19, 2021](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/60a48dd15c1fcb4077364294#reply-60a490ca59b7dc409c3d28b5)

Glad it was helpful to you, Sanvi.

[Kannan](https://hashnode.com/@rbkannan1)

[Oct 22, 2020](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/5f91d01bc626a0545fb615b5)

Awesome work. Kudos Brother. Very Informative

[Tapas Adhikary](https://hashnode.com/@atapas)

[Oct 23, 2020](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/5f91d01bc626a0545fb615b5#reply-5f924ed36aa1ed54804bb248)

Thank you [Kannan](https://hashnode.com/@rbkannan1) for liking and commenting.

[Iva Kop](https://hashnode.com/@IvaKop)

[Oct 20, 2020](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/5f8ee07b1a610045ce581ad4)

Awesome overview! Thanks for sharing ✨

[Tapas Adhikary](https://hashnode.com/@atapas)

[Oct 20, 2020](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/5f8ee07b1a610045ce581ad4#reply-5f8f08251a610045ce581e0d)

Thanks a lot [Iva](https://hashnode.com/@IvaKop)!

[Efosa Jeffrey](https://hashnode.com/@fosajeff)

[Oct 19, 2020](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/5f8d75f7c973f13b91c81e02)

Superb! I'm definitely saving this. Thanks for sharing!

[Edidiong Asikpo (Didi)](https://hashnode.com/@didicodes)

[Oct 19, 2020](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/5f8d6f87d58df13bb29170bd)

Fantastic article [Tapas Adhikary](https://hashnode.com/@atapas). I love it.

[Tapas Adhikary](https://hashnode.com/@atapas)

[Oct 20, 2020](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/5f8d6f87d58df13bb29170bd#reply-5f8f08131a610045ce581e09)

Thank You!

[Apoorv Taneja](https://hashnode.com/@plxity)

[Oct 19, 2020](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/5f8d447989e922309e012906)

Bookmarked⚡️

[Kritesh Kaushik](https://hashnode.com/@Kritesh77)

[Oct 19, 2020](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/5f8d0fca89e922309e0124ea)

Informative content... But what about back end process of uploading a file. Can it be achieved only through php or is there some other efficient way too?

[Tapas Adhikary](https://hashnode.com/@atapas)

[Oct 19, 2020](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/5f8d0fca89e922309e0124ea#reply-5f8d11e289e922309e012512)

[Kritesh Kaushik](https://hashnode.com/@Kritesh77),

Great point Kritesh! Yeah, the scope of this article was to introduce the HTML support of file upload capabilities.

The back-end part starts exactly where this article ends. I'm planning to write one sooner with `node.js` as backend.

> Can it be achieved only through php or is there some other efficient way too?

Yes, there are multiple ways.

-   It could be a combination of both front-end and back-end. For example, the HTML `File` API provides ways to get the file object and convert it into a stream, blob, string, etc.
    
    The same converted output can be used to store using a backend service written in node.js.
    
-   We can use something like `Multer` which is very efficient in handling the file upload in the node.js ecosystem.
    

I think it would be an exciting item to explain some steps to file upload using back-end services.

Thank you for reading through and asking. Appreciate it.

[Bhanu Teja Pachipulusu](https://hashnode.com/@pbteja1998)

[Oct 18, 2020](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/5f8c2c0889e922309e011f14)

[Tapas Adhikary](https://hashnode.com/@atapas) Excellent article. Bookmarked immediately after reading it.

I especially liked #9 and #10. I didn't know that we could do drag and drop using native HTML and vanilla JS. I would definitely try to look for native solutions for my problems from next time. Thanks for this article.

[Tapas Adhikary](https://hashnode.com/@atapas)

[Oct 18, 2020](https://hashnode.com/posts/10-useful-html-file-upload-tips-for-web-developers/5f8bf4ddd7dc0b17a97a3523/comment/5f8c2c0889e922309e011f14#reply-5f8c33ac83db9130bf5bc288)

Thanks [Bhanu Teja Pachipulusu](https://hashnode.com/@pbteja1998) for reading through and glad that, it was useful to you.
