Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Support for copying files and file references #57

Open
vezaynk opened this issue Dec 26, 2021 · 2 comments
Open

Implement Support for copying files and file references #57

vezaynk opened this issue Dec 26, 2021 · 2 comments

Comments

@vezaynk
Copy link
Collaborator

vezaynk commented Dec 26, 2021

We first need to figure out how to get the file path on Windows and Linux.

I have the Windows one already:

> [System.Windows.Forms.Clipboard]::GetFileDropList()
C:\Users\slava\Pictures\0.jfif
@telesoho
Copy link
Owner

@knyzorg
I have try following tests on Ubuntu 20.

  1. Select file & folder from vscode and 'Copy':
    image

List targets:

$ xclip -selection clipboard -target TARGETS -o
TIMESTAMP
TARGETS
SAVE_TARGETS
MULTIPLE
code/file-list

Get file list:

$ xclip -selection clipboard -target code/file-list -o
file:///home/telesoho/prjs/vscode-markdown-paste-image/test
file:///home/telesoho/prjs/vscode-markdown-paste-image/.gitignore
  1. Select file & folder from "File exploer", right click and select "Copy" menu.
    image

list target:

$ xclip -selection clipboard -target TARGETS -o
TIMESTAMP
TARGETS
MULTIPLE
x-special/gnome-copied-files
text/uri-list
UTF8_STRING
COMPOUND_TEXT
TEXT
STRING
text/plain;charset=utf-8
text/plain

Get file list:

$ xclip -selection clipboard -o -target STRING
/home/telesoho/installodoo/odoo-staging
/home/telesoho/installodoo/README.md

Copy file from diffrent application will get diffrent clipboard content. It is a problem how to get the correct file list.

@Sebastian-Jung
Copy link

I'm just here to tell you that this would be a great feature! Especially being able to copy and paste multiple images from the file explorer (in my case - nautilus) and having the option to save (or copy in this case) these images to the configured output folder (In the same way as Images in the clipboard are created in a specific folder) would be a great addition!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants