nunaliit2-js: Add attachment upload logic to document editor.

Issue #213