Skip to content

Test dataTransferFiles API proposal #150321

Description

@mjbvz

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:

  1. Try dragging and dropping files into VS Code and confirm you can access the file contents
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions