I made a small Windows tool that allows you to paste the contents of the clipboard as plaintext (removing formatting). Additionally it automatically uploads images and files on the clipboard to a server and pastes the url. This provides functionality similar to CloudApp, except on your own server for free. It supports FTP, SFTP, SCP, AWS S3, and WebDav, via the included WinSCP library.
Here is an example screenshot from my dev machine uploaded this way: http://rog.gy/ss/dd4299790b.png. I simply pressed Alt-PrintScreen on my keyboard to take a screenshot of my active app, then Ctrl-Shift-V to paste the URL of the uploaded screenshot.
- If content of clipboard is a file, it uploads that file to the server and pastes the public URL.
- If content of the clipboard is an image (such as a screenshot or other raw bitmap data), it saves to a png and uploads to the server, pasting the public URL.
- If content of clipboard is rich text or HTML, it pastes the plain text without formatting.
- If none of the above, it silently aborts.
In all supported cases it pastes a plain text, easily sharable representation of the content.
- Either build from source in Visual Studio 2017 or download the pre-built binary from http://rog.gy/share/UploadAndPaste.zip (yes that was uploaded using this tool!)
- Rename one of the
server-config.jsonand fill in the details.
This is the path relative to the root of your server where files should be uploaded
This is the root public URL that the files are accessible from.
You can specify a subdirectory where non-screenshot files are uploaded. Since these files may be of any type, you should configure your server/host to serve these files directly without running/executing them (for example a shared hosting provider may assume you want to execute a php script, which may result in unforeseen issues)
You can specify a subdirectory where screenshots uploaded.
- The remaining items are configuration for WinSCP to connect to the server. You can generate the values directly via WinSCP as documented here: https://winscp.net/eng/docs/ui_generateurl
- If you want to use a hotkey other than Ctrl-Shift-V, you need to modify
UploadAndPaste.hotkeyLoader.ahkand use AutoHotKey to recompile the script
UploadAndPaste.hotkeyLoader.exeor set it to run on startup. Depending on how you set it to run on startup, you may need to ensure the working directory is specified.
- With some data on the clipboard and a focused text area to paste into, press Ctrl-Shift-V to test it out.
I built this tool to scratch my own itch, but hopefully others find it useful as well. Feel free to submit any issues or PR’s on GitHub: https://github.com/OkGoDoIt/UploadAndPaste