All Projects → FutoRicky → ember-cli-dropzonejs

FutoRicky / ember-cli-dropzonejs

Licence: MIT License
Drag and drop file uploader addon using dropzonejs

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to ember-cli-dropzonejs

Ember Web App
NOTICE: official repository moved to https://github.com/zonkyio/ember-web-app
Stars: ✭ 143 (+346.88%)
Mutual labels:  ember-cli, addon
Ember Cli Typescript
Use TypeScript in your Ember.js apps!
Stars: ✭ 346 (+981.25%)
Mutual labels:  ember-cli, addon
ember-cli-mentionable
An ember addon for facebook style @mentions and #hashtags
Stars: ✭ 13 (-59.37%)
Mutual labels:  ember-cli, addon
Ember Cli Updater
ember-cli addon to help you update your ember-cli application or addon.
Stars: ✭ 32 (+0%)
Mutual labels:  ember-cli, addon
ember-app-shell
No description or website provided.
Stars: ✭ 23 (-28.12%)
Mutual labels:  ember-cli, addon
Easyscape
Runelite plugin to make Runescape easier. (ARCHIVED) This is not actively developed and are now against Jagex TOS
Stars: ✭ 14 (-56.25%)
Mutual labels:  addon
OmniCC
Cooldown count for everything
Stars: ✭ 81 (+153.13%)
Mutual labels:  addon
rc-dock
Dock Layout for React Component
Stars: ✭ 318 (+893.75%)
Mutual labels:  drag
PlusTiC
Minecraft mod for adding new tools to and integrating various mods with Tinkers Construct
Stars: ✭ 34 (+6.25%)
Mutual labels:  addon
SyncMarks-Extension
Browser Webextension for Firefox, Edge or Chromium derivatives to sync your bookmarks with a private backend.
Stars: ✭ 23 (-28.12%)
Mutual labels:  addon
ember-polaris
An Ember addon for Shopify's Polaris design system
Stars: ✭ 59 (+84.38%)
Mutual labels:  ember-cli
git-task-list
Git Task Lists
Stars: ✭ 25 (-21.87%)
Mutual labels:  ember-cli
redminetoolbar
Firefox add-on to improve handling of Redmine projects
Stars: ✭ 27 (-15.62%)
Mutual labels:  addon
ember-luxon
🕐 🌐 [deprecated] Addon thats brings Luxon to Ember applications.
Stars: ✭ 20 (-37.5%)
Mutual labels:  ember-cli
dropzoner
Laravel package for image upload using DropzoneJS
Stars: ✭ 46 (+43.75%)
Mutual labels:  dropzonejs
IOR reference
A Blender addon that display IOR values in a list
Stars: ✭ 19 (-40.62%)
Mutual labels:  addon
drop-feeds
Drop Feeds is a Sage / Sage++ like addon (webextension) for Firefox Quantum
Stars: ✭ 18 (-43.75%)
Mutual labels:  addon
ember-cli-daterangepicker
Just a simple component to use bootstrap-daterangepicker.
Stars: ✭ 32 (+0%)
Mutual labels:  addon
GodotRecorder
A simple addon to record frames of in-game footage.
Stars: ✭ 47 (+46.88%)
Mutual labels:  addon
drag-area
拖动实现区域选择,移动缩放选择区域
Stars: ✭ 18 (-43.75%)
Mutual labels:  drag

ember-cli-dropzonejs

Ember Observer Score Codeship Status for FutoRicky/ember-cli-dropzonejs

Drag and drop file uploader addon for ember-cli using Dropzonejs.

DEMO

Versions

Current version is running ember-cli >= 3.5.0

Versions 1.1.1 <= are running ember-cli 2.13.1

Versions 0.8.6 <= are running ember-cli 1.13.8

Installation

ember install ember-cli-dropzonejs

This addon will use dropzone's default css by default. If you prefer to use your own css, add this option to your ember-cli-build.js:

var app = new EmberApp(defaults, {
  ---
  emberCliDropzonejs: {
    includeDropzoneCss: false
  }
  ---
});

Usage

Simply add the component to your template like so: {{drop-zone url='/endpoint'}}

You can see all properties in the Dropzonejs configuration docs.

To set properties simply add the name of the property inside the component call and assign a value.

example:

{{drop-zone url='http://example.com/example' clickable=false addRemoveLinks=true}}

You can also use dynamic options:

// controller.js

import Controller from '@ember/controller';
import { computed } from '@ember/object';

export default Controller.extend({
  addedfile: computed(function() {
    return function() {
      Ember.Logger.debug('addedFile happened');
    };
  }),
  options: computed(function() {
    return {
      url: '#',
      addRemoveLinks: true,
      autoProcessQueue: false,
      addedfile: this.addedfile
    };
  })
});
// template.js

{{drop-zone config=options}}

If you would like to use the whole document body as a drop location you can set maxDropRegion to true

Event Handling

Dropzonejs Events Docs

To use events, set your event handler in your controller like so:

  addedFileEvent: computed(function() {
    return function() {
      // do something...
    };
  }),

and set it in your component declaration:

{{drop-zone url="http://example.com/example" addedfile=addedFileEvent}}

Remember to add an url, this addon will not work without it

Contributions

All contributions are welcomed and encouraged.

Please make all pull requests to the dev branch.

Thanks!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].