Skip to content

Support reading files in DataTransfer api  #147481

Description

@mjbvz

Follow up on #142990

Use case

Drag and drop an image from desktop into a markdown file in web VS Code. In this case, we should be able to copy the image into the workspace and then insert the link to it into the markdown file. This would require:

  • A way to get the file's name
  • A way to read the file as a UInt8Array

This would be similar the way the dom DataTransferItem api allows accessing files: https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItem/getAsFile

/cc @alexr00 As tree views could also use this

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions