Skip to content

Instantly share code, notes, and snippets.

View brianlens's full-sized avatar

Brian Lens brianlens

View GitHub Profile
brianlens /
Created September 16, 2016 12:22 — forked from lsiv568/
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';
.directive('fileDropzone', () ->
restrict: 'A'
scope: {
file: '='
fileName: '='
link: (scope, element, attrs) ->