GithubHelp home page GithubHelp logo

carl-alberto / multiple_file_drag_and_drop_upload Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arunkumarsekar/multiple_file_drag_and_drop_upload

0.0 3.0 0.0 2.92 MB

CSS 17.93% PHP 24.04% JavaScript 58.02%

multiple_file_drag_and_drop_upload's Introduction

Multiple File Drag and Drop Upload

Multiple File Drag and Drop Upload this will work in modern browsers (HTML 5), File uploads happening through ajax for this i used [Form Data] (http://www.w3.org/TR/FileAPI/) and [File Reader] (http://www.w3.org/TR/2010/WD-XMLHttpRequest2-20100907/) javascript API.

File & Folders

  • /images - Required images
  • /css - Stylesheet files
  • /js - Javascript files and libraries
  • /uploads - New files holder
  • index.php - Client side File
  • upload.php - Server Side File

Requirements

- Jquery Library (version 1.7+)
- HTML5

How to use

Config

All Fields required.

support : "image/jpg,image/png,image/bmp,image/jpeg,image/gif",		// Valid file formats
form: "demoFiler",					// Form ID
dragArea: "dragAndDropFiles",		// Upload Area ID
uploadUrl: "upload.php"				// Server side file url

Init

Its simple init. Just call function with required configurations.

initMultiUploader(config);	

Example

	var config = {
		support : "image/jpg,image/png,image/bmp,image/jpeg,image/gif",	
		form: "demoFiler",					
		dragArea: "dragAndDropFiles",		
		uploadUrl: "upload.php"				
	}
	$(document).ready(function(){
		initMultiUploader(config);
	});
<center><h1 class="title">Multiple Drag and Drop File Upload</h1></center>
<div id="dragAndDropFiles" class="uploadArea">
	<h1>Drop Images Here</h1>
</div>
<form name="demoFiler" id="demoFiler" enctype="multipart/form-data">
	<input type="file" name="multiUpload" id="multiUpload" multiple />
	<input type="submit" name="submitHandler" id="submitHandler" value="Upload" class="buttonUpload" />
</form>
<div class="progressBar">
	<div class="status"></div>
</div>	

multiple_file_drag_and_drop_upload's People

Watchers

James Cloos avatar Carl Alberto avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.