Skip to content

FileUpload can handle pasted and dropped files#1997

Draft
tomasherceg wants to merge 1 commit intomainfrom
feature/paste-or-drop-upload
Draft

FileUpload can handle pasted and dropped files#1997
tomasherceg wants to merge 1 commit intomainfrom
feature/paste-or-drop-upload

Conversation

@tomasherceg
Copy link
Member

I needed to add support for pasting or dropping files in textarea, so I refactored the FileUpload core functionality and exposed some of its properties as attached:

    <dot:TextBox Type="MultiLine" Text="{value: Text}"
                 FileUpload.UploadOnPasteOrDrop="{value: Files}"
                 FileUpload.UploadCompleted="{command: OnUploadCompleted()}"/>

When a file is pasted or dropped to the textarea, it will be automatically uploaded and placed to the Files collection.

We'll need to look at the implementation, I don't like it much - I was fighting with TypeScript definitions of DotVVM observables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant