This is a very simple VSCode extension that allows you to drag and drop files into a Markdown document, which uploads them into an S3 bucket and inserts that URL as the image.
You need to have a ~/.markdowndrop.json file with the following structure:
{"endpoint": "https://s3.us-east-1.amazonaws.com", "region": "us-east-1", "bucketName": "your-bucket-name", "accessKeyId": "your-access-key-id", "secretAccessKey": "your-secret-access-key", "cdn": "https://${bucket}.${region}.s3.amazonaws.com/${pathname}/${filepath}", "imageTagTemplate": "<ImageSection className=\"mx-auto\" src=\"${url}\" subtitle=\"${filename}\" />"# (optional - defaults to markdown syntax) }By default it will insert normal markdown syntax, but if you want something else, you can add the "imageTagTemplate" with optional $url and $filename variables. The example above will insert a custom React component.
Drag and drop a file into a Markdown document. It's important to hold down the shift key while dropping the file, otherwise VSCode will simply open the image.
This project is licensed under the MIT License. See the LICENSE file for details