Skip to content

Instantly share code, notes, and snippets.

View brianlens's full-sized avatar

Brian Lens brianlens

View GitHub Profile
@brianlens
brianlens / dropzone.coffee
Created September 16, 2016 12:22 — forked from lsiv568/dropzone.coffee
This directive uses the HTML5 drag and drop spec as well as the FileReader to base64 encode the dropped files. This allows for easy client/server transfer via REST protocol.
'use strict';
angular.module('reusableThings')
.directive('fileDropzone', () ->
restrict: 'A'
scope: {
file: '='
fileName: '='
}
link: (scope, element, attrs) ->