Skip to main content

这是基于 sapic 的一个小的扩展模块,用来将上传的图片保存到AWS S3

安装

  • 正式版本

    $ pip install -U up2s3

  • 开发版本

    $ pip install -U git+https://github.com/sapicd/up2s3.git@master

开始使用

此扩展请在部署 sapic 图床后使用,需要 其管理员进行添加扩展、设置钩子等操作。

添加:

请在 站点管理-钩子扩展 中添加第三方钩子,输入模块名称:up2s3, 确认后提交即可加载这个模块(请在服务器先手动安装或Web上安装第三方包)。

配置:

在 站点管理-网站设置 底部的钩子配置区域配置S3相关信息, 如Bucket、访问密钥ID和Secret等(请在AWS创建一个S3服务,并在 用户-我的安全凭证-访问密钥,创建新的访问密钥,拿到密钥ID(AccessKey)、SecretKey; 允许使用子用户IAM的密钥,要求拥有S3管理权限)。

目前要求s3配置为公开访问,钩子上传的图片、视频其ACL也是公共可读。

使用:

同样在 站点管理-网站设置 上传区域中选择存储后端为up2s3即可, 后续图片上传时将保存到S3。

上传图片的sender名称是:up2s3

Metadata

Release files for up2s3 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for up2s3 0.1.0
File Size Uploaded
up2s3-0.1.0.tar.gz 7.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for up2s3 0.1.0
File Interpreter ABI Platform
up2s3-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.8 kB

Release files / up2s3-0.1.0.tar.gz

Download URL up2s3-0.1.0.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
86f68331eb1b37f82cb1fea5569b6f79daf6f8619dd18dac134c7008feecc53a
BLAKE2b-256 checksum
How to use checksums
6fb7bc613d6f439aecc7c927acc0e276feb24a311c007a18fb8d6bc80445a261
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.3

Release files / up2s3-0.1.0-py3-none-any.whl

Download URL up2s3-0.1.0-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
358f8ca7306de79d8b5083618da8e39d1995de2b258dd7ccbfc5195acf8e2a20
BLAKE2b-256 checksum
How to use checksums
95eb9e2d5126fc16e511abd42650e15c2478b707c6218b205165a458347a6eb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page