# oss-image-fc3
**Repository Path**: baymax99/oss-image-fc3
## Basic Information
- **Project Name**: oss-image-fc3
- **Description**: 使用函数计算,限制图片类型上传到OSS。
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2024-06-18
- **Last Updated**: 2024-06-25
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
> 注:当前项目为 Serverless Devs 应用,由于应用中会存在需要初始化才可运行的变量(例如应用部署地区、函数名等等),所以**不推荐**直接 Clone 本仓库到本地进行部署或直接复制 s.yaml 使用,**强烈推荐**通过 `s init ${模版名称}` 的方法或应用中心进行初始化,详情可参考[部署 & 体验](#部署--体验) 。
# oss-image-fc3 帮助文档
使用函数计算,在OSS上只存储图片类型格式的文件。
- [:smiley_cat: 代码](https://gitee.com/baymax99/oss-image-fc3)
## 前期准备
使用该项目,您需要有开通以下服务并拥有对应权限:
| 服务/业务 | 权限 | 相关文档 |
| --- | --- | --- |
| 函数计算 | AliyunFCFullAccess | [帮助文档](https://help.aliyun.com/product/2508973.html) [计费文档](https://help.aliyun.com/document_detail/2512928.html) |
| OSS | AliyunOSSFullAccess | [帮助文档](undefined) [计费文档](undefined) |
## 部署 & 体验
- :fire: 通过 [Serverless 应用中心](https://fcnext.console.aliyun.com/applications/create?template=oss-image-fc3) ,
[](https://fcnext.console.aliyun.com/applications/create?template=oss-image-fc3) 该应用。
- 通过 [Serverless Devs Cli](https://www.serverless-devs.com/serverless-devs/install) 进行部署:
- [安装 Serverless Devs Cli 开发者工具](https://www.serverless-devs.com/serverless-devs/install) ,并进行[授权信息配置](https://docs.serverless-devs.com/fc/config) ;
- 初始化项目:`s init oss-image-fc3 -d oss-image-fc3`
- 进入项目,并进行项目部署:`cd oss-image-fc3 && s deploy -y`
## 案例介绍
#### 基本功能
在该案例中,用户可以通过上传 'jpg'、'jpeg'、'png'、'gif' 类型图片到指定的 OSS(Object Storage Service)桶(bucket),自动触发一系列函数计算(Function Compute)操作。这些操作会检查图片类型文件是否符合图片类型,不符合将会执行自动删除。此案例实现控制了OSS存储的图片文件类型。
## 开发者社区
您如果有关于错误的反馈或者未来的期待,您可以在 [Serverless Devs repo Issues](https://github.com/serverless-devs/serverless-devs/issues) 中进行反馈和交流。如果您想要加入我们的讨论组或者了解 FC 组件的最新动态,您可以通过以下渠道进行:
|
|
|
|
| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
微信公众号:`serverless` | 微信小助手:`xiaojiangwh` | 钉钉交流群:`33947367` |