If you found this useful, please consider buying me a coffee:heart:!
WARNING: Ensure you take a local backup from “SETTINGS > APPDATA & STORAGE > EXPORT” before setting up the extension.
Open Bucket > Permissions > Bucket Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::<AWS Account ID>:user/<IAM username>"
},
"Action": [
"s3:ListBucket",
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3:::<AWS bucket name>",
"arn:aws:s3:::<AWS bucket name>/*"
]
},
{
"Sid": "PreventSpecificFileDeletion",
"Effect": "Deny",
"Principal": {
"AWS": "arn:aws:iam::<AWS Account ID>:user/<IAM username>"
},
"Action": "s3:DeleteObject",
"Resource": "arn:aws:s3:::<AWS bucket name>/typingmind-backup.json"
}
]
}
Update AWS Account ID, IAM username and AWS bucket name in the policy with your specific values.
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"HEAD",
"GET",
"PUT",
"POST",
"DELETE"
],
"AllowedOrigins": [
"https://*.hostname.com"
],
"ExposeHeaders": [
"Access-Control-Allow-Origin"
],
"MaxAgeSeconds": 3000
}
]
If you are using typingmind cloud, use the below
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"HEAD",
"GET",
"PUT",
"POST",
"DELETE"
],
"AllowedOrigins": [
"https://www.typingmind.com"
],
"ExposeHeaders": [
"Access-Control-Allow-Origin"
],
"MaxAgeSeconds": 3000
}
]
Update “https://*.hostname.com” with your specific hostname in case you are self hosting Typingmind (e.g. https://chat.yourhostname.com). If you are using Typingmind cloud, hostname should be https://www.typingmind.com. This restricts executing S3 commands from only the specified hostname providing better security.I am a passionate developer dedicated to creating useful tools that can benefit the community. My goal is to distribute all of my projects as open source, enabling others to learn, contribute, and innovate together. If you appreciate my work and want to support my efforts, feel free to buy me a coffee :heart:!
This project is licensed under the MIT License - see the LICENSE file for details.