49 lines
778 B
Markdown
49 lines
778 B
Markdown
# typora-img-uploader
|
|
|
|
|
|
## Upload to R2
|
|
Upload images to R2 using Typora.
|
|
|
|
```bash
|
|
pip install python-dotenv boto3
|
|
```
|
|
|
|
``` bash:.env
|
|
.env
|
|
|
|
R2_ENDPOINT = 'https://your-endpoint-url'
|
|
R2_BUCKET_NAME= 'bucket name'
|
|
R2_ACCESS_KEY_ID = 'access key'
|
|
R2_SECRET_ACCESS_KEY = 'securet access key'
|
|
R2_CUSTOM_URL = 'https://custom.domain/'
|
|
```
|
|
|
|
### Usage
|
|
```python
|
|
upload_r2.py --images-path <image path>
|
|
```
|
|
|
|
## Upload to DropBox
|
|
Upload images to Dropbox.
|
|
|
|
``` bash
|
|
pip install dropbox python-dotenv
|
|
```
|
|
|
|
``` bash:.env
|
|
.env
|
|
|
|
DROPBOX_APP_KEY=your_app_key
|
|
DROPBOX_APP_SECRET=your_app_secret
|
|
DROPBOX_REFRESH_TOKEN=your_refresh_token
|
|
```
|
|
|
|
Required permissions:
|
|
- files.content.write
|
|
- files.content.read
|
|
- sharing.write
|
|
|
|
### Usage
|
|
```python
|
|
upload_dropbox.py --images-path <image path>
|
|
``` |