Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: FastGPT 官方文档
url: https://doc.fastgpt.io/
about: 查看 FastGPT 官方文档了解更多信息
- name: FastGPT 飞书交流群
url: https://oss.laf.run/otnvvf-imgs/fastgpt-feishu1.png
about: 在社区中讨论 FastGPT 相关问题
- name: 插件开发指南
url: https://doc.fastgpt.io/docs/introduction/guide/plugins/dev_system_tool
about: 查看 FastGPT 插件开发指南
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/plugin-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: 插件需求
about: 提交 FastGPT 插件需求
title: '[插件] 简要描述需求'
labels: ['plugin']
assignees: ''
---

## 需求描述

需要实现什么插件功能?

## 使用场景

在什么情况下使用这个插件?

## 输入输出

- **输入**: 需要什么参数?
- **输出**: 期望返回什么结果?

## 参考资料

相关文档或 API 接口:

## 补充说明

其他需要说明的信息:
9 changes: 6 additions & 3 deletions lib/s3/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export class S3Service {
}

private generateFileId(): string {
return randomBytes(16).toString('hex');
return randomBytes(8).toString('hex');
}

/**
Expand Down Expand Up @@ -248,8 +248,11 @@ export class S3Service {
}

// const fileId = this.generateFileId();
const prefix =
(input.prefix?.endsWith('/') ? input.prefix : input.prefix + '/') ?? PluginBaseS3Prefix;
const prefix = input.prefix
? input.prefix?.endsWith('/')
? input.prefix
: input.prefix + '/'
: PluginBaseS3Prefix;
const objectName = `${prefix}${input.keepRawFilename ? '' : this.generateFileId() + '-'}${originalFilename}`;
if (input.expireMins) {
await MongoS3TTL.create({
Expand Down