Upload And Paste
This is 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, WebDav, via the included WinSCP library.
Here is an example screenshot from my dev machine uploaded this way: 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#code
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.
- When there are multiple files on the clipboard, it only uploads one.
- There is no progress indicatior, so large uploads may appear to stall on slow connections. The mouse cursor changes to the wait cursor so you know it's working.