Test for #147481
Complexity: 5
Create Issue
Overview
The new dataTransferFiles API proposal lets extensions access the contents of files that are dropped into VS Code from external applications
Testing
To get started, checkout this branch of the extension samples: https://github.com/microsoft/vscode-extension-samples/tree/drop-file-transfer
There are two extension samples you should use:
drop-on-document
tree-view-sample
I've added example code showing the dataTransferFiles API proposal in both of them.
Some scenarios to test:
- Try dragging and dropping files into VS Code and confirm you can access the file contents
- Check the file
.name and .uri properties for the file items.
Known limitations:
- You cannot create a
FileDataTransfer yourself
- On web,
.uri will always be undefined
- We currently do not create files if you are dragging within VS Code. We may add this in the future but right now the intention is that this API is for reading external files
Test for #147481
Complexity: 5
Create Issue
Overview
The new
dataTransferFilesAPI proposal lets extensions access the contents of files that are dropped into VS Code from external applicationsTesting
To get started, checkout this branch of the extension samples: https://github.com/microsoft/vscode-extension-samples/tree/drop-file-transfer
There are two extension samples you should use:
drop-on-documenttree-view-sampleI've added example code showing the
dataTransferFilesAPI proposal in both of them.Some scenarios to test:
.nameand.uriproperties for the file items.Known limitations:
FileDataTransferyourself.uriwill always be undefined