Simple file upload example using AngularJS

Hi. In this tutorial we will create an AngularJS web app that will upload the user selected file to server using nodejs. To achieve this we will use the multer node module.

Simple file upload example using AngularJS

Live Demo Download

Installation

Open Command Prompt and navigate to the downloaded directory simple-file-uploader

Run the following command

Project Structure

The web application code is mainly separated into 2 parts (Client and Server)

public

index.html : The starting point for our application front end (Client)

server.js: File upload and save (Server)

code

index.html

The starting point for our application front end

.gitignore

It contains files that will be ignored by git to upload

package.json

It contains Required node packages

readme.md

It contains all the instructions.

server.js

It uploads and saves files.

Print Friendly

Related Posts

Written By:
  • veeran

    i am cloning the input type=”file”, now how can i get all the files in $scope.uploadFile, please help me,im following your tutorials.

  • Hari

    It works fine on my local machine. When i upload it to remote server, I get the below error message in console

    POST /savedata 404 (Not Found)

    is my domain name in which the contents are hosted.

    • Surya Sathya

      is this example really work you??… it’not working me.. can send working codes?