|
@@ -1,74 +0,0 @@
|
|
|
-
|
|
|
-let dragndrop = function(options) {
|
|
|
- console.log(options.selector);
|
|
|
- console.log('dragging and dropping here');
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-};
|
|
|
-
|
|
|
-
|
|
|
-class Transloadit {
|
|
|
- constructor(opts = {}, plugins = []) {
|
|
|
- this.opts = opts;
|
|
|
- this.plugins = plugins;
|
|
|
- }
|
|
|
-
|
|
|
- plugin(name, initializer) {
|
|
|
- return initializer();
|
|
|
- }
|
|
|
-
|
|
|
- use (iterator, opts) {
|
|
|
- iterator(opts);
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- prepare() {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- upload(files) {
|
|
|
- return new Promise(function (resolve, reject) {
|
|
|
-
|
|
|
- resolve('upload successful');
|
|
|
- });
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-let transloadit = new Transloadit();
|
|
|
-transloadit.use(dragndrop, {
|
|
|
- selector: '.drop'
|
|
|
-});
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|