sandbochs / angular-dropzone Goto Github PK
View Code? Open in Web Editor NEWAngularJS directive for Dropzone.js
License: MIT License
AngularJS directive for Dropzone.js
License: MIT License
Object {error: Object}error: Objectmessage: "Upload preset must be whitelisted for unsigned uploads"proto: Object__defineGetter__: defineGetter()defineSetter: defineSetter()lookupGetter: lookupGetter()lookupSetter: lookupSetter()constructor: Object()hasOwnProperty: hasOwnProperty()isPrototypeOf: isPrototypeOf()propertyIsEnumerable: propertyIsEnumerable()toLocaleString: toLocaleString()toString: toString()valueOf: valueOf()get proto: get proto()set proto: set proto()proto: Object
Since dropzone.js and its events are "outside of" angular, I've found it's sometimes necessary to put a $scope.$apply()
at the end of the dropzone event handler callbacks (such as success
and error
), to make make everything work properly (a common example is calling toasts or other notifications when an upload fails--often these need a digest loop to fire before they show up in the DOM).
Would it be a possibility to integrate this functionality into this module? The ideal behavior would be
I mean, thx so very much for this but I do not know how to use it!
I mean I'd like to do this: http://www.dropzonejs.com/bootstrap.html with your directive, but I do not know how to start!
where and how do I set the event listeners? How to add a preview box? how do I set the action for uploading? thx.
When the scope is destroyed, destroy (remove) the dropzone instance to avoid memory leaks.
scope.$on('$destroy', function () {
dropzone.destroy();
});
line 21:
var dropzone = new Dropzone(element.get(0), scope.dropzoneConfig);
to
var dropzone = new Dropzone(element[0], scope.dropzoneConfig);
Hey guy,
How can I display the existing files for updating record ?
Thank !!!!
bower.json should specify dropzone.js as a dependency.
bower install -S dropzone
The source file is called angular-dropzone.js but the bower.json thinks the file is called ng-dropzone.js. This breaks in brunt bowerInstall.
{
"name": "angular-dropzone",
"version": "0.1.1",
"homepage": "https://github.com/sandbochs/angular-dropzone",
"authors": [
"Elliot Shiu <[email protected]>"
],
"description": "angular-dropzone is a AngularJS directive for Dropzone.js",
"main": "lib/ng-dropzone.js",
"keywords": [
"angular-dropzone",
"ng-dropzone",
"dropzone.js",
"dropzone"
],
"license": "MIT",
"ignore": [
"**/.*",
"test"
]
}
should be
{
"name": "angular-dropzone",
"version": "0.1.1",
"homepage": "https://github.com/sandbochs/angular-dropzone",
"authors": [
"Elliot Shiu <[email protected]>"
],
"description": "angular-dropzone is a AngularJS directive for Dropzone.js",
"main": "lib/angular-dropzone.js",
"keywords": [
"angular-dropzone",
"ng-dropzone",
"dropzone.js",
"dropzone"
],
"license": "MIT",
"ignore": [
"**/.*",
"test"
]
}
from looking in the lib folder.
When adding a file in the frontend the following error appears:
TypeError: c[d] is undefined[Learn More] dropzone.min.js:1:1418
c.prototype.emit http://localhost:3000/bower_components/dropzone/downloads/dropzone.min.js:1:1418
b</b.prototype.addFile http://localhost:3000/bower_components/dropzone/downloads/dropzone.min.js:1:19292
b</b.prototype.init/d</</< http://localhost:3000/bower_components/dropzone/downloads/dropzone.min.js:1:12321
System:
Angular: 1.5.9
jQuery: 3.1.1
angular-dropzone: ^0.1.2
Compiling with gulp, but all mentioned files are included.
How can I create multiple instances of Dropzone on 1 page?
Add support for CommonJS modules, and npm, for tools such as webpack.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.