• Stars
    star
    186
  • Rank 207,316 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 13 years ago
  • Updated over 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

droparea is a HTML5 drag and drop image/file uploader jQuery plugin

Droparea

droparea is a jQuery plug-in for HTML5 drag-and-drop (images and files).

Originally it has:

  • client-side image resizing with canvas on browser option
  • data url option for sending a file/image as a text field with ajax
  • click event for browsing files

Tested on:

  • GoogleChrome (Linux; v. 23)
  • Mozilla Firefox (Linux; v. 17)

Usage


  <div class="droppable">
    <input type="file" name="my_image" data-post="/upload_my_image?parent_model_id=7" data-crop="true" />
  </div>

  <script>
      $('.droppable').droparea({
        instructions: "",
        start: function() {
          alert('Let\'s rock!');
        }
      });
  </script>

Options available

Note: If you want to post more data while uploading a file, you can use โ€œdata tagโ€.
For example: data-custom="custom-data"


data-width,
data-height : Optional but required for canvas resizing.
data-crop   : Optional. This is crop option for canvas resizing. [true/false]
data-canvas : Canvas resizing option. Default value is false.
data-post   : Optional. This is an URL for direct posting.
data-type   : Optional. File tld. [png, jpg, zip] Separate with coma if more than one.

Contributors

More Repositories

1

canvasResize

Javascript Canvas Resize Plugin. It can work both with jQuery and Zepto. It's compatible with iOS6 and Android 2.3+
JavaScript
377
star
2

f4player

f4Player :: Open Source AS3 Flash Video Player
ActionScript
116
star
3

loopback-react

loopback - react, router, redux, axios, formik, bootstrap 4 fullstack playground with authentication and user management
JavaScript
26
star
4

flipclock

flip clock jQuery plugin with CSS3 animations for modern browsers
JavaScript
22
star
5

donateme

It is a simple donation collection project by PayPal.
CSS
10
star
6

geticon

stop the social icons mania use the original !!! / use website's favicon as a social icon.
PHP
9
star
7

contextmenu

contextmenu is a context menu (right click menu) jQuery plug-in.
JavaScript
7
star
8

ubox

ubox is an overlay image viewer (It's a kind of lightbox) jQuery plug-in
JavaScript
3
star
9

holder

This is an open source server side image holder web service.
HTML
3
star
10

celebritymeter

Celebrity Meter
PHP
3
star
11

gobot

JavaScript Canvas Monte Carlo Localization Simulator
JavaScript
2
star
12

carousel

carousel is a carousel jQuery plug-in.
JavaScript
2
star
13

forma

forma is a form customization jQuery plugin.
JavaScript
2
star
14

player

player is an audio and video player jQuery plug-in.
JavaScript
2
star
15

blackboard

blackboard is an application for Google Chrome or Chromium. It is for writing or drawing while recording tutorials instead of talking.
JavaScript
2
star
16

kodkafa-app-template

This template provides a setup to get React working in Vite with HMR and KODKAFA ESLint rules.
TypeScript
1
star
17

slidezone

slidezone is a slider with customizable effects, jQuery plug-in
JavaScript
1
star