picgo-plugin-huaweicloud-obs
v1.0.1
Published
A PicGo plugin for uploading files to Huawei Cloud OBS (Object Storage Service)
Maintainers
Readme
picgo-plugin-huaweicloud-obs
A PicGo plugin for uploading images to Huawei Cloud OBS (Object Storage Service)
Features
- ✅ Upload files to Huawei Cloud OBS
- ✅ Support for custom storage paths
- ✅ Support for custom domains
- ✅ GUI configuration support
- ✅ Automatic unique filename generation
- ✅ Support for multiple file formats:
- Images: JPG, PNG, GIF, BMP, WebP, SVG, ICO, TIFF
- Videos: MP4, AVI, MOV, WMV, FLV, MKV, WebM, MPG
- Audio: MP3, WAV, OGG, M4A, FLAC, AAC
- Documents: PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, TXT
- Archives: ZIP, RAR, 7Z, TAR, GZ
- And more: JSON, XML, HTML, CSS, JS, MD, CSV
Installation
Via PicGo GUI
- Open PicGo
- Go to Plugin Settings
- Search for
huaweicloud-obs - Click Install
Via PicGo CLI
picgo install huaweicloud-obsManual Installation (for development)
git clone https://github.com/hu-qi/picgo-plugin-huaweicloud-obs.git
cd picgo-plugin-huaweicloud-obs
npm install
npm link
picgo install /path/to/picgo-plugin-huaweicloud-obsConfiguration
Required Settings
| Field | Description | Example |
| --------------------- | ------------------------------ | ---------------------------------- |
| Endpoint | OBS endpoint URL | obs.cn-north-4.myhuaweicloud.com |
| Access Key ID | Huawei Cloud Access Key ID | YOUR_ACCESS_KEY_ID |
| Secret Access Key | Huawei Cloud Secret Access Key | YOUR_SECRET_ACCESS_KEY |
| Bucket | OBS bucket name | huqi-blog |
Optional Settings
| Field | Description | Example |
| -------------- | --------------------------------- | ------------------------- |
| Path | Storage path prefix in bucket | blog/images/ |
| Custom URL | Custom domain for uploaded images | https://cdn.example.com |
Configuration via GUI
- Open PicGo
- Go to Image Hosting Settings
- Select Huawei Cloud OBS
- Fill in the required fields
- Click Confirm
Configuration via CLI
Edit PicGo config file (~/.picgo/config.json):
{
"picBed": {
"current": "huaweicloud-obs",
"huaweicloud-obs": {
"endpoint": "obs.cn-north-4.myhuaweicloud.com",
"accessKeyId": "YOUR_ACCESS_KEY_ID",
"secretAccessKey": "YOUR_SECRET_ACCESS_KEY",
"bucket": "your-bucket-name",
"path": "blog/",
"customUrl": ""
}
}
}Usage
Upload via GUI
- Configure the plugin (see above)
- Drag and drop images to PicGo
- Images will be automatically uploaded to OBS
- URLs will be copied to clipboard
Upload via CLI
# Upload single image
picgo upload /path/to/image.jpg
# Upload multiple images
picgo upload /path/to/image1.jpg /path/to/image2.pngOBS Endpoint List
Common Huawei Cloud OBS endpoints:
| Region | Endpoint |
| ---------- | -------------------------------------- |
| Beijing 1 | obs.cn-north-1.myhuaweicloud.com |
| Beijing 4 | obs.cn-north-4.myhuaweicloud.com |
| Shanghai 1 | obs.cn-east-3.myhuaweicloud.com |
| Guangzhou | obs.cn-south-1.myhuaweicloud.com |
| Hong Kong | obs.ap-southeast-1.myhuaweicloud.com |
For a complete list, see Huawei Cloud OBS Endpoints.
Getting Access Keys
- Log in to Huawei Cloud Console
- Click your username in the top right corner
- Select My Credentials
- Go to Access Keys tab
- Click Create Access Key
- Download and save your Access Key ID and Secret Access Key
Troubleshooting
Upload fails with "Access Denied"
- Verify your Access Key ID and Secret Access Key are correct
- Ensure your account has permission to write to the bucket
- Check if the bucket exists and is in the correct region
Images not accessible after upload
- Verify bucket permissions (should allow public read)
- Check if the generated URL is correct
- If using custom domain, ensure DNS is configured correctly
Plugin not showing in PicGo
- Restart PicGo after installation
- Check if the plugin is enabled in Plugin Settings
- Try reinstalling the plugin
Development
# Clone repository
git clone https://github.com/hu-qi/picgo-plugin-huaweicloud-obs.git
cd picgo-plugin-huaweicloud-obs
# Install dependencies
npm install
# Link for local testing
npm link
picgo install /path/to/picgo-plugin-huaweicloud-obsLicense
MIT © huqi
Related Links
Changelog
1.0.0
- Initial release
- Support for basic OBS upload functionality
- GUI configuration support
- Custom domain support
