superdesk/superdesk-client-core

View on GitHub
scripts/apps/dictionaries/directives/FileUpload.ts

Summary

Maintainability
A
0 mins
Test Coverage
export function FileUpload() {
    return {
        scope: true,
        link: function(scope, element, attrs) {
            element.bind('change', (event) => {
                scope.$emit('fileSelected', {file: event.target.files[0]});
            });
        },
    };
}