Creating a Simple Upload File (AngularJS Progress Bar and PHP/MySQLi)

Getting Started

Angular JS version = 1.5.7.

Creating our Database

First, we’re going to create our database. “Apache” and “MySQL” Servers are required too in this tutorial. In my case I am using XAMPP as my virtual server.

  1. Open PHPMyAdmin.
  2. Click databases, create a database and name it as angular.
  3. After creating a database, click the SQL and copy/paste the below codes.
  4.  

Creating the Interface

Next, this is our index which contains our upload form and our uploaded files table. Create a new file and copy/paste the script below and save it as index.php.

Creating the Script

Angular.js codes.

Creating a Fetch API and Saving Process

PHP API/code that fetches our uploaded files.fetch.php

Lastly, this is our PHP code/API in uploading our files.upload.php

Note: You can increase upload size of your localhost by setting the value of upload_max_filesize and post_max_size in your php.ini. Then, restart your localhost server to save your changes.

Download: Creating a Simple Upload File (AngularJS Progress Bar and PHP/MySQLi)

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top