Python/boto3 based S3 image(file) uploader.
Compatiable with Typora.
- Clone this Repository.
git clone https://github.com/Beomi/typora-s3-uploader
- Install with
install.sh
file.
You need python3.7+ to use this package.
cd typora-s3-uploader
chmod +x *.sh
./install.sh
- Copy
configs_example.json
toconfigs.json
cp configs_example.json configs.json
- Edit
configs.json
with your keys.
{
"ACCESS_KEY": "AKIAYABCDWL6FVUJABCD",
"SECRET_KEY": "00000000/abCdeFgsLqf4Zed15qU4j27y0000000",
"BUCKET_NAME": "my-bucket",
"REGION_NAME": "ap-northeast-2",
"CDN_PREFIX": "https://mybucketcdn.cloudfront.net",
"S3_PREFIX": "img/",
"USE_RANDOM_HASH": true
}
- ACCESS_KEY: AWS Programmable ACCESS_KEY
- SECRET_KEY: AWS Programmable SECRET_KEY
- BUCKET_NAME: S3 Bucket name
- REGION_NAME: S3 Bucket Region name
- (Optional) CDN_PREFIX: Remove if you do not need.
- (Optional) S3_PREFIX: Add Key prefix when uploads your file.
- (Optional) USE_RANDOM_HASH: Add Random(UUID4) strings to the end of your filename.
- Add script path information to Typora app.
Add upload.sh file path to Typora like the screenshot below.
Example path:
/Users/beomi/coding/typora-s3-uploader/upload.sh